mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-10 17:00:11 +01:00
remove async on dumpEnv
This commit is contained in:
parent
ed53bbcf15
commit
c176fe38d2
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user