From 4d88f8aac317984480912c9e2025845c947cb1ad Mon Sep 17 00:00:00 2001 From: Daniel Lugo Date: Mon, 17 Jan 2022 13:30:18 -0400 Subject: [PATCH] Response does not need to be returned --- src/routes.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/routes.js b/src/routes.js index 608400ff..8b06494a 100644 --- a/src/routes.js +++ b/src/routes.js @@ -2092,11 +2092,11 @@ module.exports = async ( await GunActions.follow(publicKey, false) // 201 would be extraneous here. Implement it inside app.put - return res.status(200).json({ + res.status(200).json({ ok: true }) } catch (err) { - return res.status(500).json({ + res.status(500).json({ errorMessage: err.message || 'Unknown error inside /api/gun/follows/' }) } @@ -2114,11 +2114,11 @@ module.exports = async ( await GunActions.unfollow(publicKey) - return res.status(200).json({ + res.status(200).json({ ok: true }) } catch (err) { - return res.status(500).json({ + res.status(500).json({ errorMessage: err.message || 'Unknown error inside /api/gun/follows/' }) } @@ -2180,12 +2180,12 @@ module.exports = async ( await GunActions.generateHandshakeAddress() } - return res.status(200).json({ + res.status(200).json({ ok: true }) } catch (err) { logger.error(err) - return res.status(500).json({ + res.status(500).json({ errorMessage: err.message }) }