diff options
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video-abuse.ts | 2 | ||||
-rw-r--r-- | server/models/video/video-blacklist.ts | 2 | ||||
-rw-r--r-- | server/models/video/video-channel.ts | 4 | ||||
-rw-r--r-- | server/models/video/video-comment.ts | 2 | ||||
-rw-r--r-- | server/models/video/video.ts | 8 |
5 files changed, 9 insertions, 9 deletions
diff --git a/server/models/video/video-abuse.ts b/server/models/video/video-abuse.ts index cc7078ae7..65b734442 100644 --- a/server/models/video/video-abuse.ts +++ b/server/models/video/video-abuse.ts | |||
@@ -64,7 +64,7 @@ export class VideoAbuseModel extends Model<VideoAbuseModel> { | |||
64 | const query = { | 64 | const query = { |
65 | offset: start, | 65 | offset: start, |
66 | limit: count, | 66 | limit: count, |
67 | order: [ getSort(sort) ], | 67 | order: getSort(sort), |
68 | include: [ | 68 | include: [ |
69 | { | 69 | { |
70 | model: AccountModel, | 70 | model: AccountModel, |
diff --git a/server/models/video/video-blacklist.ts b/server/models/video/video-blacklist.ts index 3adcec149..26167174a 100644 --- a/server/models/video/video-blacklist.ts +++ b/server/models/video/video-blacklist.ts | |||
@@ -36,7 +36,7 @@ export class VideoBlacklistModel extends Model<VideoBlacklistModel> { | |||
36 | const query = { | 36 | const query = { |
37 | offset: start, | 37 | offset: start, |
38 | limit: count, | 38 | limit: count, |
39 | order: [ getSortOnModel(sort.sortModel, sort.sortValue) ], | 39 | order: getSortOnModel(sort.sortModel, sort.sortValue), |
40 | include: [ { model: VideoModel } ] | 40 | include: [ { model: VideoModel } ] |
41 | } | 41 | } |
42 | 42 | ||
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index 289775a0f..40f3be7fe 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts | |||
@@ -151,7 +151,7 @@ export class VideoChannelModel extends Model<VideoChannelModel> { | |||
151 | const query = { | 151 | const query = { |
152 | offset: start, | 152 | offset: start, |
153 | limit: count, | 153 | limit: count, |
154 | order: [ getSort(sort) ] | 154 | order: getSort(sort) |
155 | } | 155 | } |
156 | 156 | ||
157 | return VideoChannelModel | 157 | return VideoChannelModel |
@@ -164,7 +164,7 @@ export class VideoChannelModel extends Model<VideoChannelModel> { | |||
164 | 164 | ||
165 | static listByAccount (accountId: number) { | 165 | static listByAccount (accountId: number) { |
166 | const query = { | 166 | const query = { |
167 | order: [ getSort('createdAt') ], | 167 | order: getSort('createdAt'), |
168 | include: [ | 168 | include: [ |
169 | { | 169 | { |
170 | model: AccountModel, | 170 | model: AccountModel, |
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index ab0f05d6e..47e3211a3 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts | |||
@@ -268,7 +268,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> { | |||
268 | const query = { | 268 | const query = { |
269 | offset: start, | 269 | offset: start, |
270 | limit: count, | 270 | limit: count, |
271 | order: [ getSort(sort) ], | 271 | order: getSort(sort), |
272 | where: { | 272 | where: { |
273 | videoId, | 273 | videoId, |
274 | inReplyToCommentId: null | 274 | inReplyToCommentId: null |
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index aa1878caa..59a39b1a9 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -493,7 +493,7 @@ export class VideoModel extends Model<VideoModel> { | |||
493 | distinct: true, | 493 | distinct: true, |
494 | offset: start, | 494 | offset: start, |
495 | limit: count, | 495 | limit: count, |
496 | order: [ getSort('createdAt'), [ 'Tags', 'name', 'ASC' ] ], | 496 | order: getSort('createdAt', [ 'Tags', 'name', 'ASC' ]), |
497 | where: { | 497 | where: { |
498 | id: { | 498 | id: { |
499 | [Sequelize.Op.in]: Sequelize.literal('(' + rawQuery + ')') | 499 | [Sequelize.Op.in]: Sequelize.literal('(' + rawQuery + ')') |
@@ -607,7 +607,7 @@ export class VideoModel extends Model<VideoModel> { | |||
607 | const query = { | 607 | const query = { |
608 | offset: start, | 608 | offset: start, |
609 | limit: count, | 609 | limit: count, |
610 | order: [ getSort(sort) ], | 610 | order: getSort(sort), |
611 | include: [ | 611 | include: [ |
612 | { | 612 | { |
613 | model: VideoChannelModel, | 613 | model: VideoChannelModel, |
@@ -637,7 +637,7 @@ export class VideoModel extends Model<VideoModel> { | |||
637 | const query = { | 637 | const query = { |
638 | offset: start, | 638 | offset: start, |
639 | limit: count, | 639 | limit: count, |
640 | order: [ getSort(sort) ] | 640 | order: getSort(sort), |
641 | } | 641 | } |
642 | 642 | ||
643 | const serverActor = await getServerActor() | 643 | const serverActor = await getServerActor() |
@@ -656,7 +656,7 @@ export class VideoModel extends Model<VideoModel> { | |||
656 | const query: IFindOptions<VideoModel> = { | 656 | const query: IFindOptions<VideoModel> = { |
657 | offset: start, | 657 | offset: start, |
658 | limit: count, | 658 | limit: count, |
659 | order: [ getSort(sort) ], | 659 | order: getSort(sort), |
660 | where: { | 660 | where: { |
661 | name: { | 661 | name: { |
662 | [Sequelize.Op.iLike]: '%' + value + '%' | 662 | [Sequelize.Op.iLike]: '%' + value + '%' |