We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af45c33 commit 5d377d0Copy full SHA for 5d377d0
src/app.controller.ts
@@ -94,7 +94,12 @@ export class AppController {
94
if(!req.user) {
95
throw new BadRequestException('InvalidJWT')
96
}
97
- const { address } = plainToInstance(JwtUserAccount, req.user)
+ const { address, isEnabled } = plainToInstance(JwtUserAccount, req.user)
98
+
99
+ if(!isEnabled) {
100
+ throw new ForbiddenException('User is disabled')
101
+ }
102
103
const token = await this.appService.getTokenByAddress(dto.tokenAddress)
104
if(!token) {
105
throw new NotFoundException('Token not found')
0 commit comments