|
|
@ -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'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|