@midwayjs/core 3.5.4-beta.1 → 3.5.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -118,10 +118,6 @@ let MidwayWebRouterService = class MidwayWebRouterService {
|
|
|
118
118
|
const webRouterInfo = (0, decorator_1.getClassMetadata)(decorator_1.WEB_ROUTER_KEY, controllerClz);
|
|
119
119
|
if (webRouterInfo && typeof webRouterInfo[Symbol.iterator] === 'function') {
|
|
120
120
|
for (const webRouter of webRouterInfo) {
|
|
121
|
-
if (resourceOptions.resourceFilter &&
|
|
122
|
-
!resourceOptions.resourceFilter(webRouter)) {
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
121
|
const routeArgsInfo = (0, decorator_1.getPropertyDataFromClass)(decorator_1.WEB_ROUTER_PARAM_KEY, controllerClz, webRouter.method) || [];
|
|
126
122
|
const routerResponseData = (0, decorator_1.getPropertyMetadata)(decorator_1.WEB_RESPONSE_KEY, controllerClz, webRouter.method) || [];
|
|
127
123
|
const data = {
|
|
@@ -153,6 +149,10 @@ let MidwayWebRouterService = class MidwayWebRouterService {
|
|
|
153
149
|
functionName: data.functionName,
|
|
154
150
|
};
|
|
155
151
|
}
|
|
152
|
+
if (resourceOptions.resourceFilter &&
|
|
153
|
+
!resourceOptions.resourceFilter(webRouter)) {
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
156
|
this.checkDuplicateAndPush(data.prefix, data);
|
|
157
157
|
}
|
|
158
158
|
}
|