Browse Source

Merge pull request #7568 from nocodb/nc-fix/isauthenticated-fun-typeerror

Nc fix: e.isAuthenticated is not a function
pull/7577/head
Raju Udava 10 months ago committed by GitHub
parent
commit
ef843b2779
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/nocodb/src/controllers/auth/auth.controller.ts

4
packages/nocodb/src/controllers/auth/auth.controller.ts

@ -89,7 +89,7 @@ export class AuthController {
@Post('/api/v1/auth/user/signout') @Post('/api/v1/auth/user/signout')
@HttpCode(200) @HttpCode(200)
async signOut(@Req() req: Request, @Res() res: Response): Promise<any> { async signOut(@Req() req: Request, @Res() res: Response): Promise<any> {
if (!(req as any).isAuthenticated()) { if (!(req as any).isAuthenticated?.()) {
NcError.forbidden('Not allowed'); NcError.forbidden('Not allowed');
} }
res.json( res.json(
@ -137,7 +137,7 @@ export class AuthController {
}) })
@HttpCode(200) @HttpCode(200)
async passwordChange(@Req() req: Request): Promise<any> { async passwordChange(@Req() req: Request): Promise<any> {
if (!(req as any).isAuthenticated()) { if (!(req as any).isAuthenticated?.()) {
NcError.forbidden('Not allowed'); NcError.forbidden('Not allowed');
} }

Loading…
Cancel
Save