diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-19 09:41:03 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-19 10:48:44 +0100 |
commit | 3bb6c52645af84832212c99fdec04143e4230180 (patch) | |
tree | d91539e2aed89bdd0e6d0530db5e92da45e20fb9 /server/models/video/video.ts | |
parent | 2519d9fec6f84906d1b10770be791ad367186ca7 (diff) | |
download | PeerTube-3bb6c52645af84832212c99fdec04143e4230180.tar.gz PeerTube-3bb6c52645af84832212c99fdec04143e4230180.tar.zst PeerTube-3bb6c52645af84832212c99fdec04143e4230180.zip |
Fix sort inconsistency
Diffstat (limited to 'server/models/video/video.ts')
-rw-r--r-- | server/models/video/video.ts | 8 |
1 files changed, 4 insertions, 4 deletions
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 + '%' |