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); }