aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-10 16:38:12 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-12-14 09:11:27 +0100
commit34caef7fc0710623c6894549423813d53f65b303 (patch)
treecadfce6e39ea0712ed556e8dc7ba3c64ea36e158 /shared
parent12554857b410506b9e748bb0deac09d3e7393963 (diff)
downloadPeerTube-34caef7fc0710623c6894549423813d53f65b303.tar.gz
PeerTube-34caef7fc0710623c6894549423813d53f65b303.tar.zst
PeerTube-34caef7fc0710623c6894549423813d53f65b303.zip
Add joblog at the end of ci
Diffstat (limited to 'shared')
-rw-r--r--shared/core-utils/miscs/miscs.ts1
-rw-r--r--shared/extra-utils/search/videos.ts4
2 files changed, 3 insertions, 2 deletions
diff --git a/shared/core-utils/miscs/miscs.ts b/shared/core-utils/miscs/miscs.ts
index 1eee22d82..71703faac 100644
--- a/shared/core-utils/miscs/miscs.ts
+++ b/shared/core-utils/miscs/miscs.ts
@@ -1,3 +1,4 @@
1// high excluded
1function randomInt (low: number, high: number) { 2function randomInt (low: number, high: number) {
2 return Math.floor(Math.random() * (high - low) + low) 3 return Math.floor(Math.random() * (high - low) + low)
3} 4}
diff --git a/shared/extra-utils/search/videos.ts b/shared/extra-utils/search/videos.ts
index ac65357e3..db6edbd58 100644
--- a/shared/extra-utils/search/videos.ts
+++ b/shared/extra-utils/search/videos.ts
@@ -5,10 +5,10 @@ import { VideosSearchQuery } from '../../models/search'
5import { immutableAssign } from '../miscs/miscs' 5import { immutableAssign } from '../miscs/miscs'
6import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' 6import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
7 7
8function searchVideo (url: string, search: string) { 8function searchVideo (url: string, search: string, sort = '-publishedAt') {
9 const path = '/api/v1/search/videos' 9 const path = '/api/v1/search/videos'
10 10
11 const query = { sort: '-publishedAt', search: search } 11 const query = { sort, search: search }
12 const req = request(url) 12 const req = request(url)
13 .get(path) 13 .get(path)
14 .query(query) 14 .query(query)