diff options
author | Chocobozzz <me@florianbigard.com> | 2023-01-12 11:19:42 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-01-12 11:19:42 +0100 |
commit | eba2a7a834c4ef5a409e80021faad54ceef4e6d8 (patch) | |
tree | e8d65c930292b92dc2bf68ddf7bbc3994b7fbd9b /server/models/video | |
parent | 0b96a0fb77cee07abac185fb1fb704388498631b (diff) | |
download | PeerTube-eba2a7a834c4ef5a409e80021faad54ceef4e6d8.tar.gz PeerTube-eba2a7a834c4ef5a409e80021faad54ceef4e6d8.tar.zst PeerTube-eba2a7a834c4ef5a409e80021faad54ceef4e6d8.zip |
Don't need a special comment sort function
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/sql/comment/video-comment-list-query-builder.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/sql/comment/video-comment-list-query-builder.ts b/server/models/video/sql/comment/video-comment-list-query-builder.ts index 6d752d4a4..a7eed22a1 100644 --- a/server/models/video/sql/comment/video-comment-list-query-builder.ts +++ b/server/models/video/sql/comment/video-comment-list-query-builder.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Model, Sequelize, Transaction } from 'sequelize' | 1 | import { Model, Sequelize, Transaction } from 'sequelize' |
2 | import { AbstractRunQuery, ModelBuilder } from '@server/models/shared' | 2 | import { AbstractRunQuery, ModelBuilder } from '@server/models/shared' |
3 | import { ActorImageType, VideoPrivacy } from '@shared/models' | 3 | import { ActorImageType, VideoPrivacy } from '@shared/models' |
4 | import { createSafeIn, getCommentSort, parseRowCountResult } from '../../../shared' | 4 | import { createSafeIn, getSort, parseRowCountResult } from '../../../shared' |
5 | import { VideoCommentTableAttributes } from './video-comment-table-attributes' | 5 | import { VideoCommentTableAttributes } from './video-comment-table-attributes' |
6 | 6 | ||
7 | export interface ListVideoCommentsOptions { | 7 | export interface ListVideoCommentsOptions { |
@@ -384,7 +384,7 @@ export class VideoCommentListQueryBuilder extends AbstractRunQuery { | |||
384 | private getOrder () { | 384 | private getOrder () { |
385 | if (!this.options.sort) return '' | 385 | if (!this.options.sort) return '' |
386 | 386 | ||
387 | const orders = getCommentSort(this.options.sort) | 387 | const orders = getSort(this.options.sort) |
388 | 388 | ||
389 | return 'ORDER BY ' + orders.map(o => `"${o[0]}" ${o[1]}`).join(', ') | 389 | return 'ORDER BY ' + orders.map(o => `"${o[0]}" ${o[1]}`).join(', ') |
390 | } | 390 | } |