summaryrefslogtreecommitdiff
path: root/server/app.module.ts
diff options
context:
space:
mode:
authorJoseph Ditton <jditton.atomic@gmail.com>2021-12-03 14:46:44 -0700
committerJoseph Ditton <jditton.atomic@gmail.com>2021-12-03 14:46:44 -0700
commit95961c5a14d07c79ffae0f0f36b58ca7c3ea521b (patch)
tree7d20b3e6f44d54a4c1c24b07689bf5e036e104fc /server/app.module.ts
parent84b45cd6b11347e66437cd92dc20372d0abd6eb9 (diff)
downloadlocchat-95961c5a14d07c79ffae0f0f36b58ca7c3ea521b.tar.gz
locchat-95961c5a14d07c79ffae0f0f36b58ca7c3ea521b.zip
auth guard update
Diffstat (limited to 'server/app.module.ts')
-rw-r--r--server/app.module.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/app.module.ts b/server/app.module.ts
index 41446f8..d0135c1 100644
--- a/server/app.module.ts
+++ b/server/app.module.ts
@@ -9,6 +9,7 @@ import { RolesGuard } from './providers/guards/roles.guard';
import { JwtService } from './providers/services/jwt.service';
import { RolesService } from './providers/services/roles.service';
import { UsersService } from './providers/services/users.service';
+import { GuardUtil } from './providers/util/guard.util';
@Module({
imports: [TypeOrmModule.forRoot(config), UsersModule],
@@ -17,6 +18,7 @@ import { UsersService } from './providers/services/users.service';
UsersService,
RolesService,
JwtService,
+ GuardUtil,
{ provide: APP_GUARD, useClass: AuthGuard }, // auth guard should come before roles guard
{ provide: APP_GUARD, useClass: RolesGuard }, // otherwise users won't be authenticated before roles check
],