mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-21 21:36:26 -08:00
further fixes
This commit is contained in:
parent
982154465a
commit
baebcfa716
|
@ -71,15 +71,14 @@ fileApiRoutes.post("/manage", parser, (req,res) => {
|
|||
case "changeFileVisibility":
|
||||
if (!["public","anonymous","private"].includes(req.body.value)) return;
|
||||
files.files[e].visibility = req.body.visibility;
|
||||
|
||||
writeFile(process.cwd()+"/.data/files.json",JSON.stringify(files.files), (err) => {
|
||||
if (err) console.log(err)
|
||||
})
|
||||
modified++;
|
||||
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`)
|
||||
})
|
||||
|
||||
})
|
Loading…
Reference in a new issue