ldap-tfa: add method /telegram-reject

This commit is contained in:
vchikalkin 2024-05-31 14:14:35 +03:00
parent 1a0cfec09f
commit ab1e8d44c9

View File

@ -86,8 +86,21 @@ export class LdapTfaController extends LdapController {
@Res() reply: FastifyReply
) {
const user = (await this.cacheManager.get(authId)) as User;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const token = await this.ldapService.login({ login: user.username });
return reply.status(200).send(token);
return reply.status(200).send();
}
@Get('/telegram-reject')
@ApiResponse({
status: HttpStatus.OK,
})
async telegramReject(
@Query('authId') authId: string,
@Query('employeeID') employeeID: string,
@Res() reply: FastifyReply
) {
return reply.status(200).send();
}
}