1async login(@Body('username') username: string, @Body('password') password: string, @Res() res: Response) {
2 const token = await this.authService.validateUser(username, password);
3 res.set('Authorization', 'Bearer ' + token);
4 res.send({
5 success: true,
6 token,
7 })
8});
9