mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 07:19:07 +00:00
Fix Backend version change detection
This commit is contained in:
parent
1e68d87d72
commit
f5eb03cb16
4 changed files with 111 additions and 33 deletions
|
@ -58,12 +58,11 @@ export async function checkAuthentication() {
|
|||
try {
|
||||
const response = await pResponse;
|
||||
const last_hash = window.localStorage.getItem('commit_hash');
|
||||
|
||||
if (last_hash) {
|
||||
if (last_hash !== response.data.commit_hash) {
|
||||
console.log('Detected New Backend Version, Reloading...');
|
||||
console.log(`Detected New Backend Version ${response.data.commit_hash}, Reloading...`);
|
||||
window.localStorage.removeItem('commit_hash');
|
||||
// window.location.reload();
|
||||
window.location.reload();
|
||||
}
|
||||
} else window.localStorage.setItem('commit_hash', response.data.commit_hash);
|
||||
return {auth: 2, error: null};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue