projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0385b79
)
Fix totalRepliesFromVideoAuthor SQL request
author
Chocobozzz
<me@florianbigard.com>
Fri, 3 Jan 2020 10:53:51 +0000
(11:53 +0100)
committer
Chocobozzz
<me@florianbigard.com>
Fri, 3 Jan 2020 10:53:51 +0000
(11:53 +0100)
server/models/video/video-comment.ts
patch
|
blob
|
history
diff --git
a/server/models/video/video-comment.ts
b/server/models/video/video-comment.ts
index c2798e82aad49345973ce1a7e0dc0328ce73c618..fb4d16b4d17b878f595f3e8c2c5482abf0b59138 100644
(file)
--- a/
server/models/video/video-comment.ts
+++ b/
server/models/video/video-comment.ts
@@
-62,8
+62,10
@@
enum ScopeNames {
'(' +
'SELECT COUNT("replies"."id") ' +
'FROM "videoComment" AS "replies" ' +
+ 'INNER JOIN "video" ON "video"."id" = "replies"."videoId" ' +
+ 'INNER JOIN "videoChannel" ON "videoChannel"."id" = "video"."channelId" ' +
'WHERE "replies"."originCommentId" = "VideoCommentModel"."id" ' +
- 'AND "
accountId" = ' + userAccountId
+
+ 'AND "
replies"."accountId" = "videoChannel"."accountId"'
+
')'
),
'totalRepliesFromVideoAuthor'