diff options
author | Chocobozzz <me@florianbigard.com> | 2022-02-09 17:48:15 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-02-09 17:48:15 +0100 |
commit | 9d8ef212ff46cc1b96dc407a85e7486f185c5179 (patch) | |
tree | 61fd2a1a03f84d5fefc6f257fc358b637c791a24 /server/models/utils.ts | |
parent | 57a9b61a4aeead74e8800bbfad82ef433313b204 (diff) | |
download | PeerTube-9d8ef212ff46cc1b96dc407a85e7486f185c5179.tar.gz PeerTube-9d8ef212ff46cc1b96dc407a85e7486f185c5179.tar.zst PeerTube-9d8ef212ff46cc1b96dc407a85e7486f185c5179.zip |
Fix broken dep
Diffstat (limited to 'server/models/utils.ts')
-rw-r--r-- | server/models/utils.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/models/utils.ts b/server/models/utils.ts index 0950f5f32..66b653e3d 100644 --- a/server/models/utils.ts +++ b/server/models/utils.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import { literal, Op, OrderItem, Sequelize } from 'sequelize' | 1 | import { literal, Op, OrderItem, Sequelize } from 'sequelize' |
2 | import { Col } from 'sequelize/types/utils' | ||
3 | import validator from 'validator' | 2 | import validator from 'validator' |
4 | 3 | ||
5 | type SortType = { sortModel: string, sortValue: string } | 4 | type SortType = { sortModel: string, sortValue: string } |
@@ -8,7 +7,7 @@ type SortType = { sortModel: string, sortValue: string } | |||
8 | function getSort (value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): OrderItem[] { | 7 | function getSort (value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): OrderItem[] { |
9 | const { direction, field } = buildDirectionAndField(value) | 8 | const { direction, field } = buildDirectionAndField(value) |
10 | 9 | ||
11 | let finalField: string | Col | 10 | let finalField: string | ReturnType<typeof Sequelize.col> |
12 | 11 | ||
13 | if (field.toLowerCase() === 'match') { // Search | 12 | if (field.toLowerCase() === 'match') { // Search |
14 | finalField = Sequelize.col('similarity') | 13 | finalField = Sequelize.col('similarity') |
@@ -65,7 +64,7 @@ function getVideoSort (value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): Or | |||
65 | ] | 64 | ] |
66 | } | 65 | } |
67 | 66 | ||
68 | let finalField: string | Col | 67 | let finalField: string | ReturnType<typeof Sequelize.col> |
69 | 68 | ||
70 | // Alias | 69 | // Alias |
71 | if (field.toLowerCase() === 'match') { // Search | 70 | if (field.toLowerCase() === 'match') { // Search |