further fixes

This commit is contained in:
May 2023-05-09 22:51:03 -07:00
parent 982154465a
commit baebcfa716

View file

@ -71,15 +71,14 @@ fileApiRoutes.post("/manage", parser, (req,res) => {
case "changeFileVisibility": case "changeFileVisibility":
if (!["public","anonymous","private"].includes(req.body.value)) return; if (!["public","anonymous","private"].includes(req.body.value)) return;
files.files[e].visibility = req.body.visibility; files.files[e].visibility = req.body.visibility;
writeFile(process.cwd()+"/.data/files.json",JSON.stringify(files.files), (err) => {
if (err) console.log(err)
})
modified++; modified++;
break; break;
} }
}) })
res.send(`modified ${modified} files`) writeFile(process.cwd()+"/.data/files.json",JSON.stringify(files.files), (err) => {
if (err) console.log(err)
res.send(`modified ${modified} files`)
})
}) })