@rdyl/node-koa-controller 0.5.5 → 0.5.6
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/dist/cache.js +38 -20
- package/package.json +1 -1
package/dist/cache.js
CHANGED
|
@@ -126,26 +126,44 @@ var ASTCache = /** @class */ (function () {
|
|
|
126
126
|
});
|
|
127
127
|
}); };
|
|
128
128
|
var execWithJwt = !!useJwt
|
|
129
|
-
?
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
return [
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
129
|
+
? isPublic
|
|
130
|
+
? function (instance) { return __awaiter(_this, void 0, void 0, function () {
|
|
131
|
+
var jwt;
|
|
132
|
+
return __generator(this, function (_a) {
|
|
133
|
+
switch (_a.label) {
|
|
134
|
+
case 0: return [4 /*yield*/, useJwt(instance._ctx)];
|
|
135
|
+
case 1:
|
|
136
|
+
jwt = _a.sent();
|
|
137
|
+
if (jwt) {
|
|
138
|
+
instance.jwt = jwt;
|
|
139
|
+
}
|
|
140
|
+
return [4 /*yield*/, next(instance)];
|
|
141
|
+
case 2:
|
|
142
|
+
_a.sent();
|
|
143
|
+
return [2 /*return*/];
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
}); }
|
|
147
|
+
: function (instance) { return __awaiter(_this, void 0, void 0, function () {
|
|
148
|
+
var jwt;
|
|
149
|
+
return __generator(this, function (_a) {
|
|
150
|
+
switch (_a.label) {
|
|
151
|
+
case 0: return [4 /*yield*/, useJwt(instance._ctx)];
|
|
152
|
+
case 1:
|
|
153
|
+
jwt = _a.sent();
|
|
154
|
+
if (!jwt) {
|
|
155
|
+
return [2 /*return*/, instance.status.unauthorized()];
|
|
156
|
+
}
|
|
157
|
+
if (jwt) {
|
|
158
|
+
instance.jwt = jwt;
|
|
159
|
+
}
|
|
160
|
+
return [4 /*yield*/, next(instance)];
|
|
161
|
+
case 2:
|
|
162
|
+
_a.sent();
|
|
163
|
+
return [2 /*return*/];
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}); }
|
|
149
167
|
: next;
|
|
150
168
|
var finalHandler = hasLogs
|
|
151
169
|
? function (ctx) { return __awaiter(_this, void 0, void 0, function () {
|