Update error message
This commit is contained in:
parent
b526d88036
commit
a9fe08f9e5
|
@ -15,7 +15,7 @@ class linkDELETE extends Route {
|
||||||
.where({ identifier, userId: user.id })
|
.where({ identifier, userId: user.id })
|
||||||
.first();
|
.first();
|
||||||
|
|
||||||
if (!link) return res.status(400).json({ message: 'Identifier doesn\'t exist' });
|
if (!link) return res.status(400).json({ message: 'Identifier doesn\'t exist or doesnt\'t belong to the user' });
|
||||||
|
|
||||||
await db.table('links')
|
await db.table('links')
|
||||||
.where({ id: link.id })
|
.where({ id: link.id })
|
||||||
|
|
Loading…
Reference in New Issue