diff --git a/server/endpoints/api/system/index.js b/server/endpoints/api/system/index.js index 7d97555e58ea52b0d8c58678181ba0af9d96689c..029fca8923770b39c5bbb6c05f3abfdec8a7b5e9 100644 --- a/server/endpoints/api/system/index.js +++ b/server/endpoints/api/system/index.js @@ -26,7 +26,7 @@ function apiSystemEndpoints(app) { try { if (process.env.NODE_ENV !== "production") return response.sendStatus(200).end(); - await dumpENV(); + dumpENV(); response.sendStatus(200).end(); } catch (e) { console.log(e.message, e); diff --git a/server/endpoints/system.js b/server/endpoints/system.js index ef3c4f7e9d2fda1646107d420dc9ec5abdb76306..1849a2fc4f30f9446ccefd7d7dcda07b31a17dac 100644 --- a/server/endpoints/system.js +++ b/server/endpoints/system.js @@ -66,7 +66,7 @@ function systemEndpoints(app) { app.get("/env-dump", async (_, response) => { if (process.env.NODE_ENV !== "production") return response.sendStatus(200).end(); - await dumpENV(); + dumpENV(); response.sendStatus(200).end(); }); diff --git a/server/utils/helpers/updateENV.js b/server/utils/helpers/updateENV.js index c82cdaf9eda77c787400aaf93b71af5061d47271..785c45eff6efa839a0ef3b68d07602cfd7517889 100644 --- a/server/utils/helpers/updateENV.js +++ b/server/utils/helpers/updateENV.js @@ -723,7 +723,7 @@ async function updateENV(newENVs = {}, force = false, userId = null) { } await logChangesToEventLog(newValues, userId); - if (process.env.NODE_ENV === "production") await dumpENV(); + if (process.env.NODE_ENV === "production") dumpENV(); return { newValues, error: error?.length > 0 ? error : false }; } @@ -749,7 +749,7 @@ async function logChangesToEventLog(newValues = {}, userId = null) { return; } -async function dumpENV() { +function dumpENV() { const fs = require("fs"); const path = require("path");