feat: add admin guard and JWT role support
- Create AdminGuard to check user role - Update JWT strategy to include role in payload - Update auth service to include role in token generation - Prepare admin module structure - TypeScript will resolve lint errors after server restart
This commit is contained in:
4
apps/api/dist/admin/guards/admin.guard.d.ts
vendored
Normal file
4
apps/api/dist/admin/guards/admin.guard.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { CanActivate, ExecutionContext } from '@nestjs/common';
|
||||
export declare class AdminGuard implements CanActivate {
|
||||
canActivate(context: ExecutionContext): boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user