remove async on dumpEnv

This commit is contained in:
timothycarambat 2024-06-20 20:50:14 -07:00
parent ed53bbcf15
commit c176fe38d2
3 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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();
});

View File

@ -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");