Compare commits

...

1 Commits

Author SHA1 Message Date
sky
4742f78545 fix checking validity when solving 2025-07-27 03:47:32 -04:00

View File

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