apps/api: send token after login
This commit is contained in:
parent
741a1d69ee
commit
6e323803bd
@ -73,7 +73,10 @@ export class AccountController {
|
|||||||
try {
|
try {
|
||||||
const token = await this.accountService.login(credentials);
|
const token = await this.accountService.login(credentials);
|
||||||
|
|
||||||
return reply.setCookie(env.COOKIE_TOKEN_NAME, token, cookieOptions).status(200).send();
|
return reply
|
||||||
|
.setCookie(env.COOKIE_TOKEN_NAME, token, cookieOptions)
|
||||||
|
.status(200)
|
||||||
|
.send({ token });
|
||||||
} catch {
|
} catch {
|
||||||
throw new HttpException('Unauthorized', HttpStatus.UNAUTHORIZED);
|
throw new HttpException('Unauthorized', HttpStatus.UNAUTHORIZED);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user