mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2025-05-02 17:07:13 +00:00
remove async on dumpEnv
This commit is contained in:
parent
ed53bbcf15
commit
c176fe38d2
3 changed files with 4 additions and 4 deletions
server
|
@ -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…
Add table
Add a link
Reference in a new issue