diff options
author | buoyantair <buoyantair@protonmail.com> | 2018-11-20 12:28:13 +0530 |
---|---|---|
committer | buoyantair <buoyantair@protonmail.com> | 2018-11-20 12:28:13 +0530 |
commit | bc22d60899e14631cba0fb6450f4e85fc9528293 (patch) | |
tree | 285fa55033bc065df803adc2e4e3142fdfdd7309 /shared | |
parent | b9f234371bfaf0d9cfa81e02fcea92cac1f9ae13 (diff) | |
parent | d216b5387fb774d1355df3ace002f7be469bd450 (diff) | |
download | PeerTube-bc22d60899e14631cba0fb6450f4e85fc9528293.tar.gz PeerTube-bc22d60899e14631cba0fb6450f4e85fc9528293.tar.zst PeerTube-bc22d60899e14631cba0fb6450f4e85fc9528293.zip |
Merge branch 'develop' of https://github.com/Chocobozzz/PeerTube into move-utils-to-shared
Diffstat (limited to 'shared')
-rw-r--r-- | shared/utils/requests/check-api-params.ts | 2 | ||||
-rw-r--r-- | shared/utils/search/videos.ts | 2 | ||||
-rw-r--r-- | shared/utils/server/config.ts | 2 | ||||
-rw-r--r-- | shared/utils/server/jobs.ts | 3 | ||||
-rw-r--r-- | shared/utils/server/stats.ts | 2 | ||||
-rw-r--r-- | shared/utils/users/accounts.ts | 2 | ||||
-rw-r--r-- | shared/utils/users/blocklist.ts | 2 | ||||
-rw-r--r-- | shared/utils/users/user-subscriptions.ts | 2 | ||||
-rw-r--r-- | shared/utils/users/users.ts | 2 | ||||
-rw-r--r-- | shared/utils/videos/video-abuses.ts | 2 | ||||
-rw-r--r-- | shared/utils/videos/video-captions.ts | 4 | ||||
-rw-r--r-- | shared/utils/videos/video-channels.ts | 2 | ||||
-rw-r--r-- | shared/utils/videos/video-comments.ts | 2 | ||||
-rw-r--r-- | shared/utils/videos/video-imports.ts | 3 | ||||
-rw-r--r-- | shared/utils/videos/videos.ts | 5 |
15 files changed, 20 insertions, 17 deletions
diff --git a/shared/utils/requests/check-api-params.ts b/shared/utils/requests/check-api-params.ts index edb47e0e9..a2a549682 100644 --- a/shared/utils/requests/check-api-params.ts +++ b/shared/utils/requests/check-api-params.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { makeGetRequest } from './requests' | 1 | import { makeGetRequest } from './requests' |
2 | import { immutableAssign } from '..' | 2 | import { immutableAssign } from '../miscs/miscs' |
3 | 3 | ||
4 | function checkBadStartPagination (url: string, path: string, token?: string, query = {}) { | 4 | function checkBadStartPagination (url: string, path: string, token?: string, query = {}) { |
5 | return makeGetRequest({ | 5 | return makeGetRequest({ |
diff --git a/shared/utils/search/videos.ts b/shared/utils/search/videos.ts index 115b3ff9a..ba4627017 100644 --- a/shared/utils/search/videos.ts +++ b/shared/utils/search/videos.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | import * as request from 'supertest' | 3 | import * as request from 'supertest' |
4 | import { VideosSearchQuery } from '../../models/search' | 4 | import { VideosSearchQuery } from '../../models/search' |
5 | import { immutableAssign } from '..' | 5 | import { immutableAssign } from '../miscs/miscs' |
6 | 6 | ||
7 | function searchVideo (url: string, search: string) { | 7 | function searchVideo (url: string, search: string) { |
8 | const path = '/api/v1/search/videos' | 8 | const path = '/api/v1/search/videos' |
diff --git a/shared/utils/server/config.ts b/shared/utils/server/config.ts index 15a94432b..5b888b061 100644 --- a/shared/utils/server/config.ts +++ b/shared/utils/server/config.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { makeDeleteRequest, makeGetRequest, makePutBodyRequest } from '../' | 1 | import { makeDeleteRequest, makeGetRequest, makePutBodyRequest } from '../requests/requests' |
2 | import { CustomConfig } from '../../models/server/custom-config.model' | 2 | import { CustomConfig } from '../../models/server/custom-config.model' |
3 | 3 | ||
4 | function getConfig (url: string) { | 4 | function getConfig (url: string) { |
diff --git a/shared/utils/server/jobs.ts b/shared/utils/server/jobs.ts index 3eec1d7d7..7c7e89824 100644 --- a/shared/utils/server/jobs.ts +++ b/shared/utils/server/jobs.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { Job, JobState } from '../../models' | 2 | import { Job, JobState } from '../../models' |
3 | import { ServerInfo, wait } from '../index' | 3 | import { wait } from '../miscs/miscs' |
4 | import { ServerInfo } from './servers' | ||
4 | 5 | ||
5 | function getJobsList (url: string, accessToken: string, state: JobState) { | 6 | function getJobsList (url: string, accessToken: string, state: JobState) { |
6 | const path = '/api/v1/jobs/' + state | 7 | const path = '/api/v1/jobs/' + state |
diff --git a/shared/utils/server/stats.ts b/shared/utils/server/stats.ts index 01989d952..6f079ad18 100644 --- a/shared/utils/server/stats.ts +++ b/shared/utils/server/stats.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { makeGetRequest } from '../' | 1 | import { makeGetRequest } from '../requests/requests' |
2 | 2 | ||
3 | function getStats (url: string, useCache = false) { | 3 | function getStats (url: string, useCache = false) { |
4 | const path = '/api/v1/server/stats' | 4 | const path = '/api/v1/server/stats' |
diff --git a/shared/utils/users/accounts.ts b/shared/utils/users/accounts.ts index 5601f2a77..388eb6973 100644 --- a/shared/utils/users/accounts.ts +++ b/shared/utils/users/accounts.ts | |||
@@ -4,7 +4,7 @@ import { expect } from 'chai' | |||
4 | import { existsSync, readdir } from 'fs-extra' | 4 | import { existsSync, readdir } from 'fs-extra' |
5 | import { join } from 'path' | 5 | import { join } from 'path' |
6 | import { Account } from '../../models/actors' | 6 | import { Account } from '../../models/actors' |
7 | import { root } from '../index' | 7 | import { root } from '../miscs/miscs' |
8 | import { makeGetRequest } from '../requests/requests' | 8 | import { makeGetRequest } from '../requests/requests' |
9 | 9 | ||
10 | function getAccountsList (url: string, sort = '-createdAt', statusCodeExpected = 200) { | 10 | function getAccountsList (url: string, sort = '-createdAt', statusCodeExpected = 200) { |
diff --git a/shared/utils/users/blocklist.ts b/shared/utils/users/blocklist.ts index 35b537571..0ead5e5f6 100644 --- a/shared/utils/users/blocklist.ts +++ b/shared/utils/users/blocklist.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | /* tslint:disable:no-unused-expression */ | 1 | /* tslint:disable:no-unused-expression */ |
2 | 2 | ||
3 | import { makeDeleteRequest, makePostBodyRequest } from '../index' | 3 | import { makeDeleteRequest, makePostBodyRequest } from '../requests/requests' |
4 | import { makeGetRequest } from '../requests/requests' | 4 | import { makeGetRequest } from '../requests/requests' |
5 | 5 | ||
6 | function getAccountBlocklistByAccount ( | 6 | function getAccountBlocklistByAccount ( |
diff --git a/shared/utils/users/user-subscriptions.ts b/shared/utils/users/user-subscriptions.ts index b0e7da7cc..7148fbfca 100644 --- a/shared/utils/users/user-subscriptions.ts +++ b/shared/utils/users/user-subscriptions.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { makeDeleteRequest, makeGetRequest, makePostBodyRequest } from '../' | 1 | import { makeDeleteRequest, makeGetRequest, makePostBodyRequest } from '../requests/requests' |
2 | 2 | ||
3 | function addUserSubscription (url: string, token: string, targetUri: string, statusCodeExpected = 204) { | 3 | function addUserSubscription (url: string, token: string, targetUri: string, statusCodeExpected = 204) { |
4 | const path = '/api/v1/users/me/subscriptions' | 4 | const path = '/api/v1/users/me/subscriptions' |
diff --git a/shared/utils/users/users.ts b/shared/utils/users/users.ts index 1b385aaf7..d5d62a507 100644 --- a/shared/utils/users/users.ts +++ b/shared/utils/users/users.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { makePostBodyRequest, makePutBodyRequest, updateAvatarRequest } from '../' | 2 | import { makePostBodyRequest, makePutBodyRequest, updateAvatarRequest } from '../requests/requests' |
3 | 3 | ||
4 | import { UserRole } from '../../index' | 4 | import { UserRole } from '../../index' |
5 | import { NSFWPolicyType } from '../../models/videos/nsfw-policy.type' | 5 | import { NSFWPolicyType } from '../../models/videos/nsfw-policy.type' |
diff --git a/shared/utils/videos/video-abuses.ts b/shared/utils/videos/video-abuses.ts index 8be891a9b..7f011ec0f 100644 --- a/shared/utils/videos/video-abuses.ts +++ b/shared/utils/videos/video-abuses.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { VideoAbuseUpdate } from '../../models/videos/abuse/video-abuse-update.model' | 2 | import { VideoAbuseUpdate } from '../../models/videos/abuse/video-abuse-update.model' |
3 | import { makeDeleteRequest, makePutBodyRequest } from '..' | 3 | import { makeDeleteRequest, makePutBodyRequest } from '../requests/requests' |
4 | 4 | ||
5 | function reportVideoAbuse (url: string, token: string, videoId: number | string, reason: string, specialStatus = 200) { | 5 | function reportVideoAbuse (url: string, token: string, videoId: number | string, reason: string, specialStatus = 200) { |
6 | const path = '/api/v1/videos/' + videoId + '/abuse' | 6 | const path = '/api/v1/videos/' + videoId + '/abuse' |
diff --git a/shared/utils/videos/video-captions.ts b/shared/utils/videos/video-captions.ts index 41e52be07..8d67f617b 100644 --- a/shared/utils/videos/video-captions.ts +++ b/shared/utils/videos/video-captions.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { makeDeleteRequest, makeGetRequest } from '../' | 1 | import { makeDeleteRequest, makeGetRequest, makeUploadRequest } from '../requests/requests' |
2 | import { buildAbsoluteFixturePath, makeUploadRequest } from '../index' | ||
3 | import * as request from 'supertest' | 2 | import * as request from 'supertest' |
4 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import { buildAbsoluteFixturePath } from '../miscs/miscs' | ||
5 | 5 | ||
6 | const expect = chai.expect | 6 | const expect = chai.expect |
7 | 7 | ||
diff --git a/shared/utils/videos/video-channels.ts b/shared/utils/videos/video-channels.ts index 3d37f0e4c..3935c261e 100644 --- a/shared/utils/videos/video-channels.ts +++ b/shared/utils/videos/video-channels.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { VideoChannelCreate, VideoChannelUpdate } from '../../models/videos' | 2 | import { VideoChannelCreate, VideoChannelUpdate } from '../../models/videos' |
3 | import { updateAvatarRequest } from '../index' | 3 | import { updateAvatarRequest } from '../requests/requests' |
4 | 4 | ||
5 | function getVideoChannelsList (url: string, start: number, count: number, sort?: string) { | 5 | function getVideoChannelsList (url: string, start: number, count: number, sort?: string) { |
6 | const path = '/api/v1/video-channels' | 6 | const path = '/api/v1/video-channels' |
diff --git a/shared/utils/videos/video-comments.ts b/shared/utils/videos/video-comments.ts index 7d4cae364..0ebf69ced 100644 --- a/shared/utils/videos/video-comments.ts +++ b/shared/utils/videos/video-comments.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import * as request from 'supertest' | 1 | import * as request from 'supertest' |
2 | import { makeDeleteRequest } from '../' | 2 | import { makeDeleteRequest } from '../requests/requests' |
3 | 3 | ||
4 | function getVideoCommentThreads (url: string, videoId: number | string, start: number, count: number, sort?: string, token?: string) { | 4 | function getVideoCommentThreads (url: string, videoId: number | string, start: number, count: number, sort?: string, token?: string) { |
5 | const path = '/api/v1/videos/' + videoId + '/comment-threads' | 5 | const path = '/api/v1/videos/' + videoId + '/comment-threads' |
diff --git a/shared/utils/videos/video-imports.ts b/shared/utils/videos/video-imports.ts index bf5062cd1..3fa49b432 100644 --- a/shared/utils/videos/video-imports.ts +++ b/shared/utils/videos/video-imports.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | |||
1 | import { VideoImportCreate } from '../../models/videos' | 2 | import { VideoImportCreate } from '../../models/videos' |
2 | import { makeGetRequest, makeUploadRequest } from '..' | 3 | import { makeGetRequest, makeUploadRequest } from '../requests/requests' |
3 | 4 | ||
4 | function getYoutubeVideoUrl () { | 5 | function getYoutubeVideoUrl () { |
5 | return 'https://youtu.be/msX3jv1XdvM' | 6 | return 'https://youtu.be/msX3jv1XdvM' |
diff --git a/shared/utils/videos/videos.ts b/shared/utils/videos/videos.ts index b3206e566..1ab3e7c4b 100644 --- a/shared/utils/videos/videos.ts +++ b/shared/utils/videos/videos.ts | |||
@@ -16,9 +16,10 @@ import { | |||
16 | ServerInfo, | 16 | ServerInfo, |
17 | testImage | 17 | testImage |
18 | } from '../' | 18 | } from '../' |
19 | |||
19 | import { VideoDetails, VideoPrivacy } from '../../models/videos' | 20 | import { VideoDetails, VideoPrivacy } from '../../models/videos' |
20 | import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers' | 21 | import { VIDEO_CATEGORIES, VIDEO_LANGUAGES, VIDEO_LICENCES, VIDEO_PRIVACIES } from '../../../server/initializers/constants' |
21 | import { dateIsValid, webtorrentAdd } from '../index' | 22 | import { dateIsValid, webtorrentAdd } from '../miscs/miscs' |
22 | 23 | ||
23 | type VideoAttributes = { | 24 | type VideoAttributes = { |
24 | name?: string | 25 | name?: string |