diff --git a/package.json b/package.json index 1c7abb3..8bec419 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "$schema": "https://json.schemastore.org/package", "name": "@kevisual/router", - "version": "0.0.40", + "version": "0.0.41", "description": "", "type": "module", "main": "./dist/router.js", diff --git a/src/route.ts b/src/route.ts index fb8d211..8534a04 100644 --- a/src/route.ts +++ b/src/route.ts @@ -86,7 +86,7 @@ export type RouteOpts = { export type DefineRouteOpts = Omit; const pickValue = ['path', 'key', 'id', 'description', 'type', 'middleware', 'metadata'] as const; export type RouteInfo = Pick; -export class Route { +export class Route { /** * 一级路径 */ @@ -658,8 +658,7 @@ export class QueryRouterServer extends QueryRouter { async run(msg: { id?: string; path?: string; key?: string; payload?: any }, ctx?: RouteContext & { [key: string]: any }) { const handle = this.handle; if (handle) { - const result = await this.call(msg, ctx); - return handle(result); + return handle(msg, ctx); } return super.run(msg, ctx); }