diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-27 11:48:20 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-11-27 11:48:20 +0100 |
commit | 9b337d8c0fce9c9aa68e44d76569c5abc6c0202e (patch) | |
tree | 982939626e7d146326b143f1e1c52dbf1c8bf126 /server/controllers/api/videos | |
parent | 353f8bc0c7a71ad490e4501b8c80e13e5cec1932 (diff) | |
download | PeerTube-9b337d8c0fce9c9aa68e44d76569c5abc6c0202e.tar.gz PeerTube-9b337d8c0fce9c9aa68e44d76569c5abc6c0202e.tar.zst PeerTube-9b337d8c0fce9c9aa68e44d76569c5abc6c0202e.zip |
Fix 500 on unknown thread
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r-- | server/controllers/api/videos/comment.ts | 4 |
1 files changed, 4 insertions, 0 deletions
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 | |||
160 | } | 160 | } |
161 | } | 161 | } |
162 | 162 | ||
163 | if (resultList.data.length === 0) { | ||
164 | return res.sendStatus(404) | ||
165 | } | ||
166 | |||
163 | return res.json(buildFormattedCommentTree(resultList)) | 167 | return res.json(buildFormattedCommentTree(resultList)) |
164 | } | 168 | } |
165 | 169 | ||