From c176fe38d2bd97622e22ef7c8ab6d31bfd1229e5 Mon Sep 17 00:00:00 2001 From: timothycarambat <rambat1010@gmail.com> Date: Thu, 20 Jun 2024 20:50:14 -0700 Subject: [PATCH] remove async on dumpEnv --- server/endpoints/api/system/index.js | 2 +- server/endpoints/system.js | 2 +- server/utils/helpers/updateENV.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/endpoints/api/system/index.js b/server/endpoints/api/system/index.js index 7d97555e5..029fca892 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 ef3c4f7e9..1849a2fc4 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 c82cdaf9e..785c45eff 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"); -- GitLab