fix foreach inside async

This commit is contained in:
Chris Bisset 2025-03-23 00:33:24 +00:00
parent 0001827897
commit 27ea256265

View file

@ -19,12 +19,12 @@
appSettings.apiKeyList = (await response.json()).apiKeys;
appSettings.apiTested = true;
// determine the remaining time for the key we are currently using. Note: Nested Async
appSettings.apiKeyList.forEach((key) => {
// determine the remaining time for the key we are currently using.
for (const key of appSettings.apiKeyList) {
if (persistentAppSettings.headscaleAPIKey.startsWith(key.prefix)) {
getKeyRemainingTime(new Date(key.expiration));
}
});
}
}
} catch (error) {
let message: string;