Skip to content
Snippets Groups Projects
Commit c176fe38 authored by timothycarambat's avatar timothycarambat
Browse files

remove async on dumpEnv

parent ed53bbcf
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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();
});
......
......@@ -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");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment