From 427eecf2146e13de0287ce1cf7b2b48e04599122 Mon Sep 17 00:00:00 2001 From: Tzahi12345 Date: Thu, 11 May 2023 02:44:05 -0400 Subject: [PATCH] Fixed issue where after resetting the DB, admin would have to be registered twice --- src/app/posts.services.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/posts.services.ts b/src/app/posts.services.ts index 812b1a2..0183bcf 100644 --- a/src/app/posts.services.ts +++ b/src/app/posts.services.ts @@ -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();