mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-22 13:56:27 -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":
|
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`)
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
Loading…
Reference in a new issue