diff options
Diffstat (limited to 'server/models/video/video-comment.ts')
-rw-r--r-- | server/models/video/video-comment.ts | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index fee11ec5f..536b6cb3e 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts | |||
@@ -293,7 +293,15 @@ export class VideoCommentModel extends Model<VideoCommentModel> { | |||
293 | return VideoCommentModel.scope([ ScopeNames.WITH_IN_REPLY_TO, ScopeNames.WITH_VIDEO ]).findOne(query) | 293 | return VideoCommentModel.scope([ ScopeNames.WITH_IN_REPLY_TO, ScopeNames.WITH_VIDEO ]).findOne(query) |
294 | } | 294 | } |
295 | 295 | ||
296 | static async listThreadsForApi (videoId: number, start: number, count: number, sort: string, user?: UserModel) { | 296 | static async listThreadsForApi (parameters: { |
297 | videoId: number, | ||
298 | start: number, | ||
299 | count: number, | ||
300 | sort: string, | ||
301 | user?: UserModel | ||
302 | }) { | ||
303 | const { videoId, start, count, sort, user } = parameters | ||
304 | |||
297 | const serverActor = await getServerActor() | 305 | const serverActor = await getServerActor() |
298 | const serverAccountId = serverActor.Account.id | 306 | const serverAccountId = serverActor.Account.id |
299 | const userAccountId = user ? user.Account.id : undefined | 307 | const userAccountId = user ? user.Account.id : undefined |
@@ -328,7 +336,13 @@ export class VideoCommentModel extends Model<VideoCommentModel> { | |||
328 | }) | 336 | }) |
329 | } | 337 | } |
330 | 338 | ||
331 | static async listThreadCommentsForApi (videoId: number, threadId: number, user?: UserModel) { | 339 | static async listThreadCommentsForApi (parameters: { |
340 | videoId: number, | ||
341 | threadId: number, | ||
342 | user?: UserModel | ||
343 | }) { | ||
344 | const { videoId, threadId, user } = parameters | ||
345 | |||
332 | const serverActor = await getServerActor() | 346 | const serverActor = await getServerActor() |
333 | const serverAccountId = serverActor.Account.id | 347 | const serverAccountId = serverActor.Account.id |
334 | const userAccountId = user ? user.Account.id : undefined | 348 | const userAccountId = user ? user.Account.id : undefined |