aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/comment.ts12
1 files changed, 4 insertions, 8 deletions
diff --git a/server/controllers/api/videos/comment.ts b/server/controllers/api/videos/comment.ts
index e9dbb6d1b..276948098 100644
--- a/server/controllers/api/videos/comment.ts
+++ b/server/controllers/api/videos/comment.ts
@@ -66,9 +66,7 @@ async function addVideoCommentThreadRetryWrapper (req: express.Request, res: exp
66 const comment = await retryTransactionWrapper(addVideoCommentThread, options) 66 const comment = await retryTransactionWrapper(addVideoCommentThread, options)
67 67
68 res.json({ 68 res.json({
69 comment: { 69 comment: comment.toFormattedJSON()
70 id: comment.id
71 }
72 }).end() 70 }).end()
73} 71}
74 72
@@ -80,7 +78,7 @@ function addVideoCommentThread (req: express.Request, res: express.Response) {
80 text: videoCommentInfo.text, 78 text: videoCommentInfo.text,
81 inReplyToComment: null, 79 inReplyToComment: null,
82 video: res.locals.video, 80 video: res.locals.video,
83 accountId: res.locals.oauth.token.User.Account.id 81 account: res.locals.oauth.token.User.Account
84 }, t) 82 }, t)
85 }) 83 })
86} 84}
@@ -94,9 +92,7 @@ async function addVideoCommentReplyRetryWrapper (req: express.Request, res: expr
94 const comment = await retryTransactionWrapper(addVideoCommentReply, options) 92 const comment = await retryTransactionWrapper(addVideoCommentReply, options)
95 93
96 res.json({ 94 res.json({
97 comment: { 95 comment: comment.toFormattedJSON()
98 id: comment.id
99 }
100 }).end() 96 }).end()
101} 97}
102 98
@@ -108,7 +104,7 @@ function addVideoCommentReply (req: express.Request, res: express.Response, next
108 text: videoCommentInfo.text, 104 text: videoCommentInfo.text,
109 inReplyToComment: res.locals.videoComment, 105 inReplyToComment: res.locals.videoComment,
110 video: res.locals.video, 106 video: res.locals.video,
111 accountId: res.locals.oauth.token.User.Account.id 107 account: res.locals.oauth.token.User.Account
112 }, t) 108 }, t)
113 }) 109 })
114} 110}