ensure boolean arg
This commit is contained in:
parent
c7acbbdfb1
commit
f70fc2a0ab
1 changed files with 1 additions and 8 deletions
|
|
@ -1837,13 +1837,6 @@ module.exports = async (
|
|||
* @typedef {import('express-serve-static-core').RequestHandler<P>} RequestHandler
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @typedef {import('shock-common').APISchema.FollowRequest} FollowRequest
|
||||
* @typedef {import('shock-common').APISchema.UnfollowRequest} UnfollowRequest
|
||||
* @typedef {import('shock-common').APISchema.GetFollowsResponse} GetFollowsResponse
|
||||
* @typedef {import('shock-common').Schema.Follow} Follow
|
||||
*/
|
||||
|
||||
const ap = /** @type {Application} */ (app);
|
||||
|
||||
|
|
@ -1880,7 +1873,7 @@ module.exports = async (
|
|||
throw new Error(`Missing publicKey route param.`)
|
||||
}
|
||||
|
||||
await GunActions.follow(req.params.publicKey, req.body.private)
|
||||
await GunActions.follow(req.params.publicKey, req.body.private || false)
|
||||
|
||||
// 201 would be extraneous here
|
||||
return res.status(200)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue