mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
Cleanup utils helper
This commit is contained in:
parent
59c76ffa8f
commit
06215f15e0
20 changed files with 173 additions and 166 deletions
|
@ -1,6 +1,8 @@
|
|||
// Translate for example "-name" to [ [ 'name', 'DESC' ], [ 'id', 'ASC' ] ]
|
||||
import { Sequelize } from 'sequelize-typescript'
|
||||
|
||||
type SortType = { sortModel: any, sortValue: string }
|
||||
|
||||
function getSort (value: string, lastSort: string[] = [ 'id', 'ASC' ]) {
|
||||
let field: any
|
||||
let direction: 'ASC' | 'DESC'
|
||||
|
@ -54,6 +56,7 @@ function createSimilarityAttribute (col: string, value: string) {
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
export {
|
||||
SortType,
|
||||
getSort,
|
||||
getSortOnModel,
|
||||
createSimilarityAttribute,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue