diff options
Diffstat (limited to 'server/models/abuse')
-rw-r--r-- | server/models/abuse/abuse-message.ts | 2 | ||||
-rw-r--r-- | server/models/abuse/abuse.ts | 2 | ||||
-rw-r--r-- | server/models/abuse/sql/abuse-query-builder.ts | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/server/models/abuse/abuse-message.ts b/server/models/abuse/abuse-message.ts index 20008768b..14a5bffa2 100644 --- a/server/models/abuse/abuse-message.ts +++ b/server/models/abuse/abuse-message.ts | |||
@@ -5,7 +5,7 @@ import { MAbuseMessage, MAbuseMessageFormattable } from '@server/types/models' | |||
5 | import { AbuseMessage } from '@shared/models' | 5 | import { AbuseMessage } from '@shared/models' |
6 | import { AttributesOnly } from '@shared/typescript-utils' | 6 | import { AttributesOnly } from '@shared/typescript-utils' |
7 | import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account' | 7 | import { AccountModel, ScopeNames as AccountScopeNames } from '../account/account' |
8 | import { getSort, throwIfNotValid } from '../utils' | 8 | import { getSort, throwIfNotValid } from '../shared' |
9 | import { AbuseModel } from './abuse' | 9 | import { AbuseModel } from './abuse' |
10 | 10 | ||
11 | @Table({ | 11 | @Table({ |
diff --git a/server/models/abuse/abuse.ts b/server/models/abuse/abuse.ts index 5610077c9..4ce40bf2f 100644 --- a/server/models/abuse/abuse.ts +++ b/server/models/abuse/abuse.ts | |||
@@ -34,7 +34,7 @@ import { AttributesOnly } from '@shared/typescript-utils' | |||
34 | import { ABUSE_STATES, CONSTRAINTS_FIELDS } from '../../initializers/constants' | 34 | import { ABUSE_STATES, CONSTRAINTS_FIELDS } from '../../initializers/constants' |
35 | import { MAbuseAdminFormattable, MAbuseAP, MAbuseFull, MAbuseReporter, MAbuseUserFormattable, MUserAccountId } from '../../types/models' | 35 | import { MAbuseAdminFormattable, MAbuseAP, MAbuseFull, MAbuseReporter, MAbuseUserFormattable, MUserAccountId } from '../../types/models' |
36 | import { AccountModel, ScopeNames as AccountScopeNames, SummaryOptions as AccountSummaryOptions } from '../account/account' | 36 | import { AccountModel, ScopeNames as AccountScopeNames, SummaryOptions as AccountSummaryOptions } from '../account/account' |
37 | import { getSort, throwIfNotValid } from '../utils' | 37 | import { getSort, throwIfNotValid } from '../shared' |
38 | import { ThumbnailModel } from '../video/thumbnail' | 38 | import { ThumbnailModel } from '../video/thumbnail' |
39 | import { ScopeNames as VideoScopeNames, VideoModel } from '../video/video' | 39 | import { ScopeNames as VideoScopeNames, VideoModel } from '../video/video' |
40 | import { VideoBlacklistModel } from '../video/video-blacklist' | 40 | import { VideoBlacklistModel } from '../video/video-blacklist' |
diff --git a/server/models/abuse/sql/abuse-query-builder.ts b/server/models/abuse/sql/abuse-query-builder.ts index 854f0cda8..282d4541a 100644 --- a/server/models/abuse/sql/abuse-query-builder.ts +++ b/server/models/abuse/sql/abuse-query-builder.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | import { exists } from '@server/helpers/custom-validators/misc' | 2 | import { exists } from '@server/helpers/custom-validators/misc' |
3 | import { forceNumber } from '@shared/core-utils' | 3 | import { forceNumber } from '@shared/core-utils' |
4 | import { AbuseFilter, AbuseState, AbuseVideoIs } from '@shared/models' | 4 | import { AbuseFilter, AbuseState, AbuseVideoIs } from '@shared/models' |
5 | import { buildBlockedAccountSQL, buildDirectionAndField } from '../../utils' | 5 | import { buildBlockedAccountSQL, buildSortDirectionAndField } from '../../shared' |
6 | 6 | ||
7 | export type BuildAbusesQueryOptions = { | 7 | export type BuildAbusesQueryOptions = { |
8 | start: number | 8 | start: number |
@@ -157,7 +157,7 @@ function buildAbuseListQuery (options: BuildAbusesQueryOptions, type: 'count' | | |||
157 | } | 157 | } |
158 | 158 | ||
159 | function buildAbuseOrder (value: string) { | 159 | function buildAbuseOrder (value: string) { |
160 | const { direction, field } = buildDirectionAndField(value) | 160 | const { direction, field } = buildSortDirectionAndField(value) |
161 | 161 | ||
162 | return `ORDER BY "abuse"."${field}" ${direction}` | 162 | return `ORDER BY "abuse"."${field}" ${direction}` |
163 | } | 163 | } |