@rdyl/node-koa-controller 0.0.3 → 0.0.4
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.
- package/CHANGELOG.md +1 -1
- package/dist/controller/index.js +3 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/controller/index.js
CHANGED
|
@@ -90,10 +90,10 @@ function RegisterASTCacheRoutes(router) {
|
|
|
90
90
|
var handlers = route.handlers, prefix = route.prefix, Instance = route.Instance;
|
|
91
91
|
handlers.forEach(function (handler) {
|
|
92
92
|
var method = handler.method, url = handler.url, name = handler.name;
|
|
93
|
-
var path = (0, path_1.join)("/" + prefix, url);
|
|
93
|
+
var path = (0, path_1.join)("/" + exports.ASTCache.prefix, prefix, url);
|
|
94
94
|
var isPublic = route.isPublic || route.isPublic;
|
|
95
95
|
if (isPublic) {
|
|
96
|
-
exports.ASTCache.whitelist.push(
|
|
96
|
+
exports.ASTCache.whitelist.push(path);
|
|
97
97
|
}
|
|
98
98
|
// @ts-ignore
|
|
99
99
|
router[method.toLowerCase()](path, function (_ctx) {
|
|
@@ -117,9 +117,7 @@ function useController(app_1, _a) {
|
|
|
117
117
|
switch (_d.label) {
|
|
118
118
|
case 0:
|
|
119
119
|
exports.ASTCache.prefix = prefix;
|
|
120
|
-
router = new koa_router_1.default(
|
|
121
|
-
prefix: prefix,
|
|
122
|
-
});
|
|
120
|
+
router = new koa_router_1.default();
|
|
123
121
|
rootDir = (0, path_1.resolve)(process.cwd(), root);
|
|
124
122
|
initAST = function (dir) { return __awaiter(_this, void 0, void 0, function () {
|
|
125
123
|
var list, _i, list_1, p, url, stat, isDir, sp, ext, _a;
|