mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-14 02:20:12 +01:00
remove async on dumpEnv
This commit is contained in:
parent
ed53bbcf15
commit
c176fe38d2
@ -26,7 +26,7 @@ function apiSystemEndpoints(app) {
|
|||||||
try {
|
try {
|
||||||
if (process.env.NODE_ENV !== "production")
|
if (process.env.NODE_ENV !== "production")
|
||||||
return response.sendStatus(200).end();
|
return response.sendStatus(200).end();
|
||||||
await dumpENV();
|
dumpENV();
|
||||||
response.sendStatus(200).end();
|
response.sendStatus(200).end();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e.message, e);
|
console.log(e.message, e);
|
||||||
|
@ -66,7 +66,7 @@ function systemEndpoints(app) {
|
|||||||
app.get("/env-dump", async (_, response) => {
|
app.get("/env-dump", async (_, response) => {
|
||||||
if (process.env.NODE_ENV !== "production")
|
if (process.env.NODE_ENV !== "production")
|
||||||
return response.sendStatus(200).end();
|
return response.sendStatus(200).end();
|
||||||
await dumpENV();
|
dumpENV();
|
||||||
response.sendStatus(200).end();
|
response.sendStatus(200).end();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -723,7 +723,7 @@ async function updateENV(newENVs = {}, force = false, userId = null) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await logChangesToEventLog(newValues, userId);
|
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 };
|
return { newValues, error: error?.length > 0 ? error : false };
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -749,7 +749,7 @@ async function logChangesToEventLog(newValues = {}, userId = null) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function dumpENV() {
|
function dumpENV() {
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user