mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2026-05-26 12:32:25 +00:00
Allow data syncing and deletion
This commit is contained in:
parent
e0bc0d2e81
commit
2faaa2e18b
10 changed files with 138 additions and 28 deletions
|
|
@ -78,6 +78,20 @@ function presetURLParamsBody() {
|
|||
]
|
||||
}
|
||||
|
||||
function presetEnsureParams(list) {
|
||||
return [
|
||||
state => {
|
||||
return list.every(name => state.params.has(name))
|
||||
},
|
||||
() => ({
|
||||
statusCode: 400,
|
||||
contentType: "application/json",
|
||||
content: `Some required body parameters were missing. Required parameters: ${list.join(", ")}`
|
||||
})
|
||||
]
|
||||
}
|
||||
|
||||
module.exports.V = V
|
||||
module.exports.presetLoad = presetLoad
|
||||
module.exports.presetURLParamsBody = presetURLParamsBody
|
||||
module.exports.presetEnsureParams = presetEnsureParams
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue