ensure boolean arg

This commit is contained in:
Daniel Lugo 2020-06-03 14:49:11 -04:00
parent c7acbbdfb1
commit f70fc2a0ab

View file

@ -1837,13 +1837,6 @@ module.exports = async (
* @typedef {import('express-serve-static-core').RequestHandler<P>} RequestHandler * @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); const ap = /** @type {Application} */ (app);
@ -1880,7 +1873,7 @@ module.exports = async (
throw new Error(`Missing publicKey route param.`) 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 // 201 would be extraneous here
return res.status(200) return res.status(200)