From a15871560f80e07386c1dabb8370cd2664ecfd1f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 31 Jan 2020 16:56:52 +0100 Subject: Move to eslint --- server/models/video/video-comment.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'server/models/video/video-comment.ts') diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index fb4d16b4d..b33c33d5e 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts @@ -257,10 +257,10 @@ export class VideoCommentModel extends Model { } static async listThreadsForApi (parameters: { - videoId: number, - start: number, - count: number, - sort: string, + videoId: number + start: number + count: number + sort: string user?: MUserAccountId }) { const { videoId, start, count, sort, user } = parameters @@ -300,8 +300,8 @@ export class VideoCommentModel extends Model { } static async listThreadCommentsForApi (parameters: { - videoId: number, - threadId: number, + videoId: number + threadId: number user?: MUserAccountId }) { const { videoId, threadId, user } = parameters @@ -314,7 +314,7 @@ export class VideoCommentModel extends Model { order: [ [ 'createdAt', 'ASC' ], [ 'updatedAt', 'ASC' ] ] as Order, where: { videoId, - [ Op.or ]: [ + [Op.or]: [ { id: threadId }, { originCommentId: threadId } ], @@ -346,7 +346,7 @@ export class VideoCommentModel extends Model { order: [ [ 'createdAt', order ] ] as Order, where: { id: { - [ Op.in ]: Sequelize.literal('(' + + [Op.in]: Sequelize.literal('(' + 'WITH RECURSIVE children (id, "inReplyToCommentId") AS ( ' + `SELECT id, "inReplyToCommentId" FROM "videoComment" WHERE id = ${comment.id} ` + 'UNION ' + @@ -355,7 +355,7 @@ export class VideoCommentModel extends Model { ') ' + 'SELECT id FROM children' + ')'), - [ Op.ne ]: comment.id + [Op.ne]: comment.id } }, transaction: t @@ -461,7 +461,7 @@ export class VideoCommentModel extends Model { } isDeleted () { - return null !== this.deletedAt + return this.deletedAt !== null } extractMentions () { -- cgit v1.2.3