From 4742f785452e0d83986d783b40dccb51fb971e6a Mon Sep 17 00:00:00 2001 From: sky Date: Sun, 27 Jul 2025 03:47:32 -0400 Subject: [PATCH] fix checking validity when solving --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 9e7839c..e667357 100644 --- a/index.js +++ b/index.js @@ -35,7 +35,7 @@ app.use("/solved", async (req, res) => { res.send(readdirSync("./data").length); }); app.post("/solve", async (req, res) => { - let file = "./data/" + req.body.uuid + "/image.png"; + let file = Bun.file("./data/" + req.body.uuid + "/image.png"); if(await file.exists() && (req.body.answer.length == 4 || req.body.answer.length == 5)) { await Bun.write("./data/" + req.body.uuid + "/answer.txt", req.body.answer); }