Skip to content
This repository has been archived by the owner on Jul 31, 2022. It is now read-only.

Commit

Permalink
clutter removed
Browse files Browse the repository at this point in the history
  • Loading branch information
JensUweB committed Jan 9, 2020
1 parent 5aed41e commit 31a5ab9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/modules/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ export class AuthService {
async login(user: any) {
const payload = { firstName: user.firstName, userId: user._id };
const result = this.jwtService.sign(payload);
console.log(payload);
console.log(this.jwtService.verify(result));
const authModel = new AuthModel();
authModel.token = result;
authModel.tokenExpireDate = new Date(Date.now() + 1000*60*60 + 1000*3600);
Expand Down
3 changes: 0 additions & 3 deletions src/modules/guards/auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ export class AuthGuard implements CanActivate {
const token = Authorization.replace('Bearer ', '');
const { userId, firstName } = this.jwtService.verify(token) as { userId: string; firstName: string } ;



return !!userId;
throw new UnauthorizedException();
}
}
}

0 comments on commit 31a5ab9

Please sign in to comment.