mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-25 07:06:25 -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