mock response for now

This commit is contained in:
Daniel Lugo 2020-06-10 13:17:28 -04:00
parent 7d7d1f98de
commit 2cc5dfd55d

View file

@ -1866,14 +1866,14 @@ module.exports = async (
/** /**
* @type {RequestHandler<FollowsRouteParams>} * @type {RequestHandler<FollowsRouteParams>}
*/ */
const apiGunFollowsPut = async (req, res) => { const apiGunFollowsPut = (req, res) => {
try { try {
const { publicKey } = req.params; const { publicKey } = req.params;
if (!publicKey) { if (!publicKey) {
throw new Error(`Missing publicKey route param.`) throw new Error(`Missing publicKey route param.`)
} }
await GunActions.follow(req.params.publicKey, false) // await GunActions.follow(req.params.publicKey, false)
// 201 would be extraneous here. Implement it inside app.put // 201 would be extraneous here. Implement it inside app.put
return res.status(200).json({ return res.status(200).json({
@ -1889,14 +1889,15 @@ module.exports = async (
/** /**
* @type {RequestHandler<FollowsRouteParams>} * @type {RequestHandler<FollowsRouteParams>}
*/ */
const apiGunFollowsDelete = async (req, res) => { const apiGunFollowsDelete = (req, res) => {
try { try {
const { publicKey } = req.params; const { publicKey } = req.params;
if (!publicKey) { if (!publicKey) {
throw new Error(`Missing publicKey route param.`) throw new Error(`Missing publicKey route param.`)
} }
await GunActions.unfollow(req.params.publicKey) // await GunActions.unfollow(req.params.publicKey)
return res.status(200).json({ return res.status(200).json({
ok: true ok: true
}) })