X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fapi%2Fvideos%2Fcomment.ts;h=020d0b10470b709a989bbb48762b281cc05c5112;hb=9b337d8c0fce9c9aa68e44d76569c5abc6c0202e;hp=ccd76c0933cef487940d8764e0cfa97aa8e6e1f7;hpb=0f8d00e3144060270d7fe603865fccaf18649c47;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/api/videos/comment.ts b/server/controllers/api/videos/comment.ts index ccd76c093..020d0b104 100644 --- a/server/controllers/api/videos/comment.ts +++ b/server/controllers/api/videos/comment.ts @@ -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)) }