This commit is contained in:
2025-02-26 12:33:34 +08:00
parent 1c3e65df8a
commit de3187f5f3
2 changed files with 3 additions and 3 deletions

View File

@@ -472,7 +472,7 @@ export class QueryRouter {
ctx.body = null;
return ctx;
}
ctx.query = ctx.nextQuery;
ctx.query = { ...ctx.query, ...ctx.nextQuery };
ctx.nextQuery = {};
return await this.runRoute(path, key, ctx);
}
@@ -497,7 +497,7 @@ export class QueryRouter {
*/
async parse(message: { path: string; key?: string; payload?: any }, ctx?: RouteContext & { [key: string]: any }) {
if (!message?.path) {
return Promise.resolve({ code: 404, body: 'Not found path' });
return Promise.resolve({ code: 404, body: null, message: 'Not found path' });
}
const { path, key = '', payload = {}, ...query } = message;
ctx = ctx || {};