This commit is contained in:
les
2019-08-09 00:19:57 +02:00
parent bb32611e73
commit e96880fc92
4 changed files with 10 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ module.exports = {
if (typeof body.object !== 'string') return
const username = body.object.replace(`${config.baseurl}/federation/u/`, '')
const user = await User.findOne({ where: { username }})
if (!user) return res.sendStatus(404)
if (!user) return res.status(404).send('User not found')
// check for duplicate
if (user.followers.indexOf(body.actor) === -1) {