From f70fc2a0abd51fb80e05b53534e676b6d860ab76 Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Wed, 3 Jun 2020 14:49:11 -0400 Subject: [PATCH] ensure boolean arg --- src/routes.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/routes.js b/src/routes.js index c9e00672..a9251e51 100644 --- a/src/routes.js +++ b/src/routes.js @@ -1837,13 +1837,6 @@ module.exports = async ( * @typedef {import('express-serve-static-core').RequestHandler

} 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)