From 4836de517c83cdddd53dc94269b8fccb1f3f38fe Mon Sep 17 00:00:00 2001 From: GreenyDev Date: Fri, 28 Apr 2023 20:47:15 -0400 Subject: [PATCH] tmp --- app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 7d954bf..cfbb97c 100644 --- a/app.js +++ b/app.js @@ -14,11 +14,11 @@ import bcrypt from "bcrypt"; const PORT = process.env.PORT || 3000; const __dirname = process.cwd(); const ACTIVE_CODES = new Set(); -if (!fs.existsSync("./memory.txt")) { - fs.writeFileSync("./memory.txt", "", "utf-8"); +if (!fs.existsSync("./tmp/memory.txt")) { + fs.writeFileSync("./tmp/memory.txt", "", "utf-8"); } let TOKENS = fs - .readFileSync("./memory.txt", "utf-8") + .readFileSync("./tmp/memory.txt", "utf-8") .trim() .split("\n") .map((token) => { @@ -138,7 +138,7 @@ app.post("/validate-otp", (req, res) => { }); fs.writeFileSync( - "./memory.txt", + "./tmp/memory.txt", TOKENS.map((token) => { return `${token.id}:${token.token}:${token.expiration}`; }).join("\n"),