mirror of https://github.com/Chocobozzz/PeerTube
Fix thread replies API response
parent
285981f4dd
commit
2a021e6cb6
|
@ -166,8 +166,6 @@ async function listVideoThreadComments (req: express.Request, res: express.Respo
|
|||
}
|
||||
}
|
||||
|
||||
logger.info('coucou', { resultList })
|
||||
|
||||
if (resultList.data.length === 0) {
|
||||
return res.sendStatus(HttpStatusCode.NOT_FOUND_404)
|
||||
}
|
||||
|
|
|
@ -483,10 +483,14 @@ export class VideoCommentModel extends Model {
|
|||
order: [ [ 'createdAt', 'ASC' ], [ 'updatedAt', 'ASC' ] ] as Order,
|
||||
where: {
|
||||
videoId,
|
||||
[Op.and]: [
|
||||
{
|
||||
[Op.or]: [
|
||||
{ id: threadId },
|
||||
{ originCommentId: threadId }
|
||||
],
|
||||
]
|
||||
},
|
||||
{
|
||||
[Op.or]: [
|
||||
{
|
||||
accountId: {
|
||||
|
@ -500,6 +504,8 @@ export class VideoCommentModel extends Model {
|
|||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
const scopes: any[] = [
|
||||
|
|
Loading…
Reference in New Issue