Skip to content

Commit 5b99937

Browse files
committed
Corrected bug where users could view admin panel when backend service is down
1 parent afdf601 commit 5b99937

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/components/admin_navbar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ async function VerifyAdminSession() {
3838
return (data.authenticated === true);
3939
} catch (error) {
4040
console.error("Error sending request:", error);
41+
return false;
4142
}
4243
}
4344

src/components/navbar.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ async function VerifySession() {
4141
return (data.authenticated === true);
4242
} catch (error) {
4343
console.error("Error sending request:", error);
44+
return false;
4445
}
4546
}
4647

0 commit comments

Comments
 (0)