diff options
author | Chocobozzz <me@florianbigard.com> | 2019-09-04 16:23:37 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-09-04 16:23:37 +0200 |
commit | 951532924c1b3fd547cbf45f0c9cf9734203d6b4 (patch) | |
tree | 1fa1ef653a9591932a057ea1317a2ea129b96665 /server/models/video | |
parent | 5eb9bde8aa50951c7896d5278d0788dda541c475 (diff) | |
download | PeerTube-951532924c1b3fd547cbf45f0c9cf9734203d6b4.tar.gz PeerTube-951532924c1b3fd547cbf45f0c9cf9734203d6b4.tar.zst PeerTube-951532924c1b3fd547cbf45f0c9cf9734203d6b4.zip |
Fix blacklist sort
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/video-blacklist.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/video/video-blacklist.ts b/server/models/video/video-blacklist.ts index 18a1b8b4b..cdb725e7a 100644 --- a/server/models/video/video-blacklist.ts +++ b/server/models/video/video-blacklist.ts | |||
@@ -1,11 +1,11 @@ | |||
1 | import { AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' | 1 | import { AllowNull, BelongsTo, Column, CreatedAt, DataType, Default, ForeignKey, Is, Model, Table, UpdatedAt } from 'sequelize-typescript' |
2 | import { getSortOnModel, SortType, throwIfNotValid } from '../utils' | 2 | import { getBlacklistSort, getSort, SortType, throwIfNotValid } from '../utils' |
3 | import { ScopeNames as VideoModelScopeNames, VideoModel } from './video' | 3 | import { ScopeNames as VideoModelScopeNames, VideoModel } from './video' |
4 | import { ScopeNames as VideoChannelScopeNames, SummaryOptions, VideoChannelModel } from './video-channel' | 4 | import { ScopeNames as VideoChannelScopeNames, SummaryOptions, VideoChannelModel } from './video-channel' |
5 | import { isVideoBlacklistReasonValid, isVideoBlacklistTypeValid } from '../../helpers/custom-validators/video-blacklist' | 5 | import { isVideoBlacklistReasonValid, isVideoBlacklistTypeValid } from '../../helpers/custom-validators/video-blacklist' |
6 | import { VideoBlacklist, VideoBlacklistType } from '../../../shared/models/videos' | 6 | import { VideoBlacklist, VideoBlacklistType } from '../../../shared/models/videos' |
7 | import { CONSTRAINTS_FIELDS } from '../../initializers/constants' | 7 | import { CONSTRAINTS_FIELDS } from '../../initializers/constants' |
8 | import { FindOptions } from 'sequelize' | 8 | import { FindOptions, literal } from 'sequelize' |
9 | import { ThumbnailModel } from './thumbnail' | 9 | import { ThumbnailModel } from './thumbnail' |
10 | 10 | ||
11 | @Table({ | 11 | @Table({ |
@@ -57,7 +57,7 @@ export class VideoBlacklistModel extends Model<VideoBlacklistModel> { | |||
57 | return { | 57 | return { |
58 | offset: start, | 58 | offset: start, |
59 | limit: count, | 59 | limit: count, |
60 | order: getSortOnModel(sort.sortModel, sort.sortValue) | 60 | order: getBlacklistSort(sort.sortModel, sort.sortValue) |
61 | } | 61 | } |
62 | } | 62 | } |
63 | 63 | ||