Skip to content

Commit

Permalink
chore: update ver
Browse files Browse the repository at this point in the history
  • Loading branch information
timi137137 committed Oct 17, 2024
1 parent 419a4c7 commit c6e8b6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/ip-filter.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ export class IpFilterGuard implements CanActivate {
context: ExecutionContext,
): Promise<boolean> | Observable<boolean> | boolean {
// get guard
const guard = this.reflector.getAllAndOverride<boolean>('ipFilter', [context.getHandler(), context.getClass()]);
const guard = this.reflector.getAllAndOverride<boolean>('ipFilter', [
context.getHandler(),
context.getClass(),
]);

// if not global and guard is not defined, then skip ip filter
if (!this.ipFilterService.isGlobal && guard === undefined) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@timi137/nestjs-ipfilter",
"version": "0.1.4",
"version": "0.1.5",
"description": "IP filter module for Nest framework (node.js) 🌎",
"author": "悠静 <[email protected]>",
"license": "MIT",
Expand Down

0 comments on commit c6e8b6a

Please sign in to comment.