Add validation to dependencies GET endpoint and update service logic (#2778)

* Add validation to dependencies GET endpoint and update service logic

* fix https://github.com/whyour/qinglong/pull/2778/files/6063bc3a67fb329de9b90f7c93524b862bd9eb93#r2266494581

* remove default condition type

* fix query mistakes
This commit is contained in:
涛之雨
2025-10-11 23:23:13 +08:00
committed by GitHub
parent f7472b6e74
commit a1f888af59
3 changed files with 42 additions and 27 deletions
+8 -2
View File
@@ -27,6 +27,13 @@ class Application {
constructor() {
this.app = express();
// 创建一个全局中间件,删除查询参数中的t
this.app.use((req: express.Request, res: express.Response, next: express.NextFunction) => {
if (req.query.t) {
delete req.query.t;
}
next();
});
}
async start() {
@@ -54,8 +61,7 @@ class Application {
if (metadata) {
if (!this.isShuttingDown) {
Logger.error(
`${metadata.serviceType} worker ${worker.process.pid} died (${
signal || code
`${metadata.serviceType} worker ${worker.process.pid} died (${signal || code
}). Restarting...`,
);
const newWorker = this.forkWorker(metadata.serviceType);