Return with a callback function
This commit is contained in:
parent
ac2f99eb75
commit
1bfd1a920f
|
@ -20,7 +20,7 @@ function makeFriends (req, res, next) {
|
||||||
// We need to quit our friends before make new ones
|
// We need to quit our friends before make new ones
|
||||||
res.sendStatus(409)
|
res.sendStatus(409)
|
||||||
} else {
|
} else {
|
||||||
next()
|
return next()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue