Fix: Save account error was because in constructor type did not end in underscore

Fix: Employee save as checking for in None instead of is None

Feature: Checking the existing token for validity in constructor of auth service, this should prevent last login showing
Feature: Moved the middleware secret key into the env file

Chore: Replaced my own GUID() with postgres UUID() type
This commit is contained in:
2020-06-30 11:32:09 +05:30
parent 6ccb3634be
commit ad8a2d2cc3
19 changed files with 132 additions and 171 deletions

View File

@ -18,7 +18,7 @@ export class JwtInterceptor implements HttpInterceptor {
// console.log("intercepting:\nisRefreshing: ", this.isRefreshing, "\n user: ", this.authService.user,"\n needsRefreshing: ", this.authService.needsRefreshing());
if (!this.isRefreshing && this.authService.user && this.authService.needsRefreshing()) {
this.isRefreshing = true;
this.authService.refreshToken().subscribe( x=> this.isRefreshing = false);
this.authService.refreshToken().subscribe( x => this.isRefreshing = false);
}
const currentUser = this.authService.user;
if (currentUser?.access_token) {