From 40479f263b6ef37c7a38ebcdbd599a59ed9669d2 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sun, 25 Jul 2021 22:14:16 -0500 Subject: [PATCH] Add dev util to reset all acct hotkeys to default --- scripts/server/developer.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/server/developer.js b/scripts/server/developer.js index fbb9eba8..85b5604d 100644 --- a/scripts/server/developer.js +++ b/scripts/server/developer.js @@ -445,4 +445,21 @@ function migrateSubAccountsToPerServerData() { } } +// =========================================================================== + +function resetAllAccountsHotkeysToDefault() { + let dbConnection = connectToDatabase(); + let dbQuery = false; + let dbAssoc = false; + if(dbConnection) { + dbQuery = queryDatabase(dbConnection, `SELECT acct_id FROM acct_main`); + if(dbQuery) { + while(dbAssoc = fetchQueryAssoc(dbQuery)) { + createDefaultKeybindsForAccount(dbAssoc["acct_id"]); + } + freeDatabaseQuery(dbQuery); + } + } +} + // =========================================================================== \ No newline at end of file