improvement: redirect to ticketId after new ticket

This commit is contained in:
canove
2020-08-04 15:29:14 -03:00
parent f7e8fed7d8
commit 87dc0c0625
3 changed files with 9 additions and 4 deletions

View File

@@ -61,7 +61,7 @@ exports.index = async (req, res, next) => {
});
if (!ticket) {
return res.status(400).json({ error: "No ticket found with this ID" });
return res.status(404).json({ error: "No ticket found with this ID" });
}
await setMessagesAsRead(ticketId);