chore: update version to 0.0.41 and improve Route class formatting
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json.schemastore.org/package",
|
"$schema": "https://json.schemastore.org/package",
|
||||||
"name": "@kevisual/router",
|
"name": "@kevisual/router",
|
||||||
"version": "0.0.40",
|
"version": "0.0.41",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/router.js",
|
"main": "./dist/router.js",
|
||||||
|
|||||||
@@ -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 }) {
|
async run(msg: { id?: string; path?: string; key?: string; payload?: any }, ctx?: RouteContext & { [key: string]: any }) {
|
||||||
const handle = this.handle;
|
const handle = this.handle;
|
||||||
if (handle) {
|
if (handle) {
|
||||||
const result = await this.call(msg, ctx);
|
return handle(msg, ctx);
|
||||||
return handle(result);
|
|
||||||
}
|
}
|
||||||
return super.run(msg, ctx);
|
return super.run(msg, ctx);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user