rest-easy-loki
Advanced tools
Comparing version 0.5.0 to 0.5.1
import * as Koa from 'koa'; | ||
/** Simple Policy Enforcement Point */ | ||
export declare const pep: (ctx: Koa.Context, next: () => Promise<any>) => void; | ||
export declare const pep: (ctx: Koa.Context, next: () => Promise<any>) => Promise<void>; |
@@ -75,10 +75,11 @@ "use strict"; | ||
/** Simple Policy Enforcement Point */ | ||
exports.pep = (ctx, next) => { | ||
exports.pep = async (ctx, next) => { | ||
if (!apiKeys) { | ||
next(); | ||
// Use await next. See here: https://github.com/ZijianHe/koa-router/issues/358 | ||
await next(); | ||
} | ||
if (pdp(ctx)) { | ||
next(); | ||
else if (pdp(ctx)) { | ||
await next(); | ||
} | ||
}; | ||
//# sourceMappingURL=authorization.js.map |
{ | ||
"name": "rest-easy-loki", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "A REST interface for lokijs supporting CRUD operations and automatic creation of new collections.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
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
53684
723