aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/utils.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-10 22:15:25 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-10 22:15:25 +0200
commit69818c9394366b954b6ba3bd697bd9d2b09f2a16 (patch)
treead199a18ec3c322460d6f9523fc383ee562554e0 /server/models/utils.ts
parent4d4e5cd4dca78480ec7f40e747f424cd107376a4 (diff)
downloadPeerTube-69818c9394366b954b6ba3bd697bd9d2b09f2a16.tar.gz
PeerTube-69818c9394366b954b6ba3bd697bd9d2b09f2a16.tar.zst
PeerTube-69818c9394366b954b6ba3bd697bd9d2b09f2a16.zip
Type functions
Diffstat (limited to 'server/models/utils.ts')
-rw-r--r--server/models/utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/utils.ts b/server/models/utils.ts
index fd84a9239..7ba96815e 100644
--- a/server/models/utils.ts
+++ b/server/models/utils.ts
@@ -1,7 +1,7 @@
1// Translate for example "-name" to [ 'name', 'DESC' ] 1// Translate for example "-name" to [ 'name', 'DESC' ]
2function getSort (value) { 2function getSort (value: string) {
3 let field 3 let field: string
4 let direction 4 let direction: 'ASC' | 'DESC'
5 5
6 if (value.substring(0, 1) === '-') { 6 if (value.substring(0, 1) === '-') {
7 direction = 'DESC' 7 direction = 'DESC'