📜  使用嵌套 js 设置 cookie - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:38.205000             🧑  作者: Mango

代码示例1
async login(@Body('username') username: string, @Body('password') password: string, @Res() res: Response) {
    const token = await this.authService.validateUser(username, password);
    res.set('Authorization', 'Bearer ' + token);
    res.send({
        success: true,
        token,
    })
});