ifx: fix run ERROR
This commit is contained in:
2439
package-lock.json
generated
Normal file
2439
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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.36",
|
"version": "0.0.37",
|
||||||
"description": "",
|
"description": "",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/router.js",
|
"main": "./dist/router.js",
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||||
"@rollup/plugin-typescript": "^12.3.0",
|
"@rollup/plugin-typescript": "^12.3.0",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
"@types/node": "^24.10.1",
|
"@types/node": "^24.10.2",
|
||||||
"@types/send": "^1.2.1",
|
"@types/send": "^1.2.1",
|
||||||
"@types/ws": "^8.18.1",
|
"@types/ws": "^8.18.1",
|
||||||
"@types/xml2js": "^0.4.14",
|
"@types/xml2js": "^0.4.14",
|
||||||
|
|||||||
@@ -107,8 +107,8 @@ export class App<U = {}> {
|
|||||||
async queryRoute(path: string, key?: string, payload?: any, ctx?: AppRouteContext<U> & { [key: string]: any }) {
|
async queryRoute(path: string, key?: string, payload?: any, ctx?: AppRouteContext<U> & { [key: string]: any }) {
|
||||||
return await this.router.queryRoute({ path, key, payload }, ctx);
|
return await this.router.queryRoute({ path, key, payload }, ctx);
|
||||||
}
|
}
|
||||||
async run(path: string, key?: string, payload?: any, ctx?: AppRouteContext<U> & { [key: string]: any }) {
|
async run(msg: { id?: string, path?: string; key?: string; payload?: any }, ctx?: AppRouteContext<U> & { [key: string]: any }) {
|
||||||
return await this.router.run({ path, key, payload }, ctx);
|
return await this.router.run(msg, ctx);
|
||||||
}
|
}
|
||||||
exportRoutes() {
|
exportRoutes() {
|
||||||
return this.router.exportRoutes();
|
return this.router.exportRoutes();
|
||||||
|
|||||||
@@ -655,13 +655,13 @@ export class QueryRouterServer extends QueryRouter {
|
|||||||
* @param param0
|
* @param param0
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async run({ path, key, payload }: { 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({ path, key, payload }, ctx);
|
const result = await this.call(msg, ctx);
|
||||||
return handle(result);
|
return handle(result);
|
||||||
}
|
}
|
||||||
return super.run({ path, key, payload }, ctx);
|
return super.run(msg, ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user