mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-25 07:06:25 -08:00
fix: 🐛 body is not sent in delete requests requiring a parameter
Switches from using req.body to using req.params to know whether or not to delete their files
This commit is contained in:
parent
d87583392e
commit
44133630a7
|
@ -142,7 +142,7 @@ module.exports = function(files: Files) {
|
|||
}
|
||||
)
|
||||
|
||||
router.delete("/me",
|
||||
router.delete("/me/:deleteFiles",
|
||||
requiresAccount,
|
||||
noAPIAccess,
|
||||
parser,
|
||||
|
@ -157,7 +157,7 @@ module.exports = function(files: Files) {
|
|||
|
||||
const deleteAccount = () => Accounts.deleteAccount(accountId).then(_ => res.send("account deleted"))
|
||||
|
||||
if (req.body.deleteFiles) {
|
||||
if (Boolean(req.params.deleteFiles)) {
|
||||
const Files = Account.files.map(e => e)
|
||||
|
||||
for (let fileId of Files) {
|
||||
|
|
Loading…
Reference in a new issue