From a774ab311b15fc2cac6aa9c43cd70ae474d29ca4 Mon Sep 17 00:00:00 2001 From: tycrek Date: Wed, 7 Dec 2022 14:31:28 -0700 Subject: [PATCH] feat: try to reset user array at start of onStart* I don't think it works --- src/auth.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/auth.ts b/src/auth.ts index a2732db..85b310f 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -139,6 +139,9 @@ export const setUserPassword = (unid: string, password: string): Promise = * Called by ass.ts on startup */ export const onStart = (authFile = 'auth.json') => new Promise((resolve, reject) => { + // Reset user array (https://stackoverflow.com/questions/1232040/how-do-i-empty-an-array-in-javascript#1232046) + // ! I don't think this works properly..? + users.splice(0, users.length); const file = path(authFile); log.debug('Reading', file);