Fixed issue where after resetting the DB, admin would have to be registered twice

This commit is contained in:
Tzahi12345
2023-05-11 02:44:05 -04:00
parent 4f54e408a5
commit 427eecf214

View File

@@ -734,7 +734,7 @@ export class PostsService implements CanActivate {
this.afterLogin(res['user'], res['token'], res['permissions'], res['available_permissions']);
}
}, err => {
if (err.status === 401) {
if (err === 'Unauthorized') {
this.sendToLogin();
this.token = null;
this.resetHttpParams();