Response does not need to be returned

This commit is contained in:
Daniel Lugo 2022-01-17 13:30:18 -04:00
parent 9d4429956b
commit 4d88f8aac3

View file

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