appolo-agent
Advanced tools
Comparing version 6.0.29 to 6.0.30
@@ -171,4 +171,12 @@ "use strict"; | ||
}; | ||
this._router.add(method, path, dto); | ||
this._routes.set(`${method}#${path}`, dto); | ||
let routeKey = `${method}#${path}`; | ||
let routeHandler = this._routes.get(routeKey); | ||
if (routeHandler) { | ||
routeHandler.errors.push(...errors); | ||
routeHandler.middlewares.push(...middlewares); | ||
} | ||
else { | ||
this._router.add(method, path, dto); | ||
this._routes.set(routeKey, dto); | ||
} | ||
if (this._isInitialized) { | ||
@@ -175,0 +183,0 @@ this._initializeHandler(dto); |
@@ -263,5 +263,17 @@ import {IOptions} from "./IOptions"; | ||
this._router.add(method, path, dto); | ||
this._routes.set(`${method}#${path}`, dto); | ||
let routeKey = `${method}#${path}`; | ||
let routeHandler = this._routes.get(routeKey); | ||
if(routeHandler){ | ||
routeHandler.errors.push(...errors); | ||
routeHandler.middlewares.push(...middlewares); | ||
} else { | ||
this._router.add(method, path, dto); | ||
this._routes.set(routeKey, dto); | ||
} | ||
if (this._isInitialized) { | ||
@@ -268,0 +280,0 @@ this._initializeHandler(dto); |
@@ -27,3 +27,3 @@ { | ||
"main": "./index.js", | ||
"version": "6.0.29", | ||
"version": "6.0.30", | ||
"license": "MIT", | ||
@@ -30,0 +30,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
104039
1757