From ac9b5ef652ebc2f0224f048cdf9575edd04bf493 Mon Sep 17 00:00:00 2001 From: Timon Ostertun Date: Fri, 16 May 2025 17:10:51 +0200 Subject: [PATCH] gitflow-hotfix-stash: fix_login --- client/scripts/database.js | 10 +++++++++- server/version.php | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/scripts/database.js b/client/scripts/database.js index 0f7ef08..4944f33 100644 --- a/client/scripts/database.js +++ b/client/scripts/database.js @@ -1343,7 +1343,14 @@ function resetDb() { db.transaction('rankings', 'readwrite').objectStore('rankings').clear(); db.transaction('follows', 'readwrite').objectStore('follows').clear(); db.transaction('expenditures', 'readwrite').objectStore('expenditures').clear(); - var osUpdateTimes = db.transaction('update_times', 'readwrite').objectStore('update_times'); + var ta = db.transaction('update_times', 'readwrite'); + ta.oncomplete = (event) => { + log('[db] resetDb: Transaction complete'); + }; + ta.onerror = (event) => { + log('[db] resetDb: Transaction failed'); + }; + var osUpdateTimes = ta.objectStore('update_times'); osUpdateTimes.put({ table: 'last_sync', time: 1 }); osUpdateTimes.put({ table: 'clubs', time: 0 }); osUpdateTimes.put({ table: 'boats', time: 0 }); @@ -1358,6 +1365,7 @@ function resetDb() { osUpdateTimes.put({ table: 'users', time: 0 }); osUpdateTimes.put({ table: 'expenditures', time: 0 }); osUpdateTimes.put({ table: 'loggedin', status: isLoggedIn() }); + ta.commit(); log('[db] DB update times reset'); hideLoader(); } diff --git a/server/version.php b/server/version.php index 2f94939..13213ab 100644 --- a/server/version.php +++ b/server/version.php @@ -1,5 +1,5 @@