Fix 500 on unknown thread

pull/3377/head
Chocobozzz 2020-11-27 11:48:20 +01:00
parent 353f8bc0c7
commit 9b337d8c0f
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 0 deletions

View File

@ -160,6 +160,10 @@ async function listVideoThreadComments (req: express.Request, res: express.Respo
}
}
if (resultList.data.length === 0) {
return res.sendStatus(404)
}
return res.json(buildFormattedCommentTree(resultList))
}