mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-22 05:46:26 -08:00
http method changes and use ServeError
This commit is contained in:
parent
a1b6917831
commit
d87583392e
|
@ -124,7 +124,7 @@ module.exports = function(files: Files) {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
router.put(
|
router.patch(
|
||||||
"/dfv",
|
"/dfv",
|
||||||
requiresAccount, requiresPermissions("manage"),
|
requiresAccount, requiresPermissions("manage"),
|
||||||
(req, res) => {
|
(req, res) => {
|
||||||
|
@ -137,9 +137,7 @@ module.exports = function(files: Files) {
|
||||||
|
|
||||||
res.send(`dfv has been set to ${Account.defaultFileVisibility}`)
|
res.send(`dfv has been set to ${Account.defaultFileVisibility}`)
|
||||||
} else {
|
} else {
|
||||||
res.status(400)
|
ServeError(res, 400, "invalid dfv")
|
||||||
|
|
||||||
res.send("invalid dfv")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -174,7 +172,7 @@ module.exports = function(files: Files) {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
router.put("/me/name",
|
router.patch("/me/name",
|
||||||
requiresAccount,
|
requiresAccount,
|
||||||
noAPIAccess,
|
noAPIAccess,
|
||||||
parser,
|
parser,
|
||||||
|
|
Loading…
Reference in a new issue