mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-21 21:36: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",
|
||||
requiresAccount, requiresPermissions("manage"),
|
||||
(req, res) => {
|
||||
|
@ -137,9 +137,7 @@ module.exports = function(files: Files) {
|
|||
|
||||
res.send(`dfv has been set to ${Account.defaultFileVisibility}`)
|
||||
} else {
|
||||
res.status(400)
|
||||
|
||||
res.send("invalid dfv")
|
||||
ServeError(res, 400, "invalid dfv")
|
||||
}
|
||||
}
|
||||
)
|
||||
|
@ -174,7 +172,7 @@ module.exports = function(files: Files) {
|
|||
}
|
||||
)
|
||||
|
||||
router.put("/me/name",
|
||||
router.patch("/me/name",
|
||||
requiresAccount,
|
||||
noAPIAccess,
|
||||
parser,
|
||||
|
|
Loading…
Reference in a new issue