From eba2a7a834c4ef5a409e80021faad54ceef4e6d8 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 12 Jan 2023 11:19:42 +0100 Subject: Don't need a special comment sort function --- server/models/video/sql/comment/video-comment-list-query-builder.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/models/video/sql') 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 @@ import { Model, Sequelize, Transaction } from 'sequelize' import { AbstractRunQuery, ModelBuilder } from '@server/models/shared' import { ActorImageType, VideoPrivacy } from '@shared/models' -import { createSafeIn, getCommentSort, parseRowCountResult } from '../../../shared' +import { createSafeIn, getSort, parseRowCountResult } from '../../../shared' import { VideoCommentTableAttributes } from './video-comment-table-attributes' export interface ListVideoCommentsOptions { @@ -384,7 +384,7 @@ export class VideoCommentListQueryBuilder extends AbstractRunQuery { private getOrder () { if (!this.options.sort) return '' - const orders = getCommentSort(this.options.sort) + const orders = getSort(this.options.sort) return 'ORDER BY ' + orders.map(o => `"${o[0]}" ${o[1]}`).join(', ') } -- cgit v1.2.3