add user quitpage in back controller for status

This commit is contained in:
kinou-p 2023-05-12 16:31:59 +02:00
parent 0845fea10f
commit a8ade1a433
2 changed files with 2 additions and 1 deletions

View File

@ -108,6 +108,7 @@ export class AppController {
user.status = 0;
await this.userService.save(user);
console.log("User quit");
}
// @Get('/chat')

View File

@ -20,7 +20,7 @@ function Home()
const handleButtonClick = () => {
const token = localStorage.getItem('token')
console.log(`token type= ${typeof token}`);
if (token !== null)
if (token !== null && typeof token === 'string')
{
console.log(`already token= ${localStorage.getItem('token')}`)
return ;