diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 14:27:30 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:19 +0200 |
commit | 4c7e60bc17ee5830399bac4aa273356903421b4c (patch) | |
tree | 9e67397cf49b229b5bc0f9747f1a7e387bba558a /server/tests/api/check-params | |
parent | c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea (diff) | |
download | PeerTube-4c7e60bc17ee5830399bac4aa273356903421b4c.tar.gz PeerTube-4c7e60bc17ee5830399bac4aa273356903421b4c.tar.zst PeerTube-4c7e60bc17ee5830399bac4aa273356903421b4c.zip |
Reorganize imports
Diffstat (limited to 'server/tests/api/check-params')
18 files changed, 22 insertions, 35 deletions
diff --git a/server/tests/api/check-params/abuses.ts b/server/tests/api/check-params/abuses.ts index 87d93195c..72f2cbd8f 100644 --- a/server/tests/api/check-params/abuses.ts +++ b/server/tests/api/check-params/abuses.ts | |||
@@ -1,22 +1,21 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { HttpStatusCode } from '@shared/models' | ||
5 | import { | 4 | import { |
6 | AbusesCommand, | 5 | AbusesCommand, |
7 | checkBadCountPagination, | 6 | checkBadCountPagination, |
8 | checkBadSortPagination, | 7 | checkBadSortPagination, |
9 | checkBadStartPagination, | 8 | checkBadStartPagination, |
10 | cleanupTests, | 9 | cleanupTests, |
11 | doubleFollow, | ||
12 | createSingleServer, | 10 | createSingleServer, |
11 | doubleFollow, | ||
13 | makeGetRequest, | 12 | makeGetRequest, |
14 | makePostBodyRequest, | 13 | makePostBodyRequest, |
15 | PeerTubeServer, | 14 | PeerTubeServer, |
16 | setAccessTokensToServers, | 15 | setAccessTokensToServers, |
17 | waitJobs | 16 | waitJobs |
18 | } from '@shared/extra-utils' | 17 | } from '@shared/extra-utils' |
19 | import { AbuseCreate, AbuseState } from '@shared/models' | 18 | import { AbuseCreate, AbuseState, HttpStatusCode } from '@shared/models' |
20 | 19 | ||
21 | describe('Test abuses API validators', function () { | 20 | describe('Test abuses API validators', function () { |
22 | const basePath = '/api/v1/abuses/' | 21 | const basePath = '/api/v1/abuses/' |
diff --git a/server/tests/api/check-params/accounts.ts b/server/tests/api/check-params/accounts.ts index 0cae485d9..141d869b7 100644 --- a/server/tests/api/check-params/accounts.ts +++ b/server/tests/api/check-params/accounts.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { HttpStatusCode } from '@shared/models' | ||
5 | import { | 4 | import { |
6 | checkBadCountPagination, | 5 | checkBadCountPagination, |
7 | checkBadSortPagination, | 6 | checkBadSortPagination, |
@@ -10,6 +9,7 @@ import { | |||
10 | createSingleServer, | 9 | createSingleServer, |
11 | PeerTubeServer | 10 | PeerTubeServer |
12 | } from '@shared/extra-utils' | 11 | } from '@shared/extra-utils' |
12 | import { HttpStatusCode } from '@shared/models' | ||
13 | 13 | ||
14 | describe('Test accounts API validators', function () { | 14 | describe('Test accounts API validators', function () { |
15 | const path = '/api/v1/accounts/' | 15 | const path = '/api/v1/accounts/' |
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index c3438917e..87cb2287e 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { omit } from 'lodash' | 4 | import { omit } from 'lodash' |
5 | import { HttpStatusCode } from '@shared/models' | ||
6 | import { | 5 | import { |
7 | cleanupTests, | 6 | cleanupTests, |
8 | createSingleServer, | 7 | createSingleServer, |
@@ -12,7 +11,7 @@ import { | |||
12 | PeerTubeServer, | 11 | PeerTubeServer, |
13 | setAccessTokensToServers | 12 | setAccessTokensToServers |
14 | } from '@shared/extra-utils' | 13 | } from '@shared/extra-utils' |
15 | import { CustomConfig } from '@shared/models' | 14 | import { CustomConfig, HttpStatusCode } from '@shared/models' |
16 | 15 | ||
17 | describe('Test config API validators', function () { | 16 | describe('Test config API validators', function () { |
18 | const path = '/api/v1/config/custom' | 17 | const path = '/api/v1/config/custom' |
diff --git a/server/tests/api/check-params/contact-form.ts b/server/tests/api/check-params/contact-form.ts index 8e755c69b..1df9993da 100644 --- a/server/tests/api/check-params/contact-form.ts +++ b/server/tests/api/check-params/contact-form.ts | |||
@@ -1,9 +1,9 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { HttpStatusCode } from '@shared/models' | ||
5 | import { cleanupTests, createSingleServer, killallServers, MockSmtpServer, PeerTubeServer } from '@shared/extra-utils' | 4 | import { cleanupTests, createSingleServer, killallServers, MockSmtpServer, PeerTubeServer } from '@shared/extra-utils' |
6 | import { ContactFormCommand } from '@shared/extra-utils/server' | 5 | import { ContactFormCommand } from '@shared/extra-utils/server' |
6 | import { HttpStatusCode } from '@shared/models' | ||
7 | 7 | ||
8 | describe('Test contact form API validators', function () { | 8 | describe('Test contact form API validators', function () { |
9 | let server: PeerTubeServer | 9 | let server: PeerTubeServer |
diff --git a/server/tests/api/check-params/live.ts b/server/tests/api/check-params/live.ts index 0ef86a538..700b4724d 100644 --- a/server/tests/api/check-params/live.ts +++ b/server/tests/api/check-params/live.ts | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { omit } from 'lodash' | 4 | import { omit } from 'lodash' |
5 | import { HttpStatusCode } from '@shared/models' | ||
6 | import { | 5 | import { |
7 | buildAbsoluteFixturePath, | 6 | buildAbsoluteFixturePath, |
8 | cleanupTests, | 7 | cleanupTests, |
@@ -10,12 +9,12 @@ import { | |||
10 | LiveCommand, | 9 | LiveCommand, |
11 | makePostBodyRequest, | 10 | makePostBodyRequest, |
12 | makeUploadRequest, | 11 | makeUploadRequest, |
13 | sendRTMPStream, | ||
14 | PeerTubeServer, | 12 | PeerTubeServer, |
13 | sendRTMPStream, | ||
15 | setAccessTokensToServers, | 14 | setAccessTokensToServers, |
16 | stopFfmpeg | 15 | stopFfmpeg |
17 | } from '@shared/extra-utils' | 16 | } from '@shared/extra-utils' |
18 | import { VideoCreateResult, VideoPrivacy } from '@shared/models' | 17 | import { HttpStatusCode, VideoCreateResult, VideoPrivacy } from '@shared/models' |
19 | 18 | ||
20 | describe('Test video lives API validator', function () { | 19 | describe('Test video lives API validator', function () { |
21 | const path = '/api/v1/videos/live' | 20 | const path = '/api/v1/videos/live' |
diff --git a/server/tests/api/check-params/plugins.ts b/server/tests/api/check-params/plugins.ts index d3dda7fce..33f84ecbc 100644 --- a/server/tests/api/check-params/plugins.ts +++ b/server/tests/api/check-params/plugins.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { HttpStatusCode } from '@shared/models' | ||
5 | import { | 4 | import { |
6 | checkBadCountPagination, | 5 | checkBadCountPagination, |
7 | checkBadSortPagination, | 6 | checkBadSortPagination, |
@@ -14,7 +13,7 @@ import { | |||
14 | PeerTubeServer, | 13 | PeerTubeServer, |
15 | setAccessTokensToServers | 14 | setAccessTokensToServers |
16 | } from '@shared/extra-utils' | 15 | } from '@shared/extra-utils' |
17 | import { PeerTubePlugin, PluginType } from '@shared/models' | 16 | import { HttpStatusCode, PeerTubePlugin, PluginType } from '@shared/models' |
18 | 17 | ||
19 | describe('Test server plugins API validators', function () { | 18 | describe('Test server plugins API validators', function () { |
20 | let server: PeerTubeServer | 19 | let server: PeerTubeServer |
diff --git a/server/tests/api/check-params/search.ts b/server/tests/api/check-params/search.ts index b49169e38..a3da54e1f 100644 --- a/server/tests/api/check-params/search.ts +++ b/server/tests/api/check-params/search.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { HttpStatusCode } from '@shared/models' | ||
5 | import { | 4 | import { |
6 | checkBadCountPagination, | 5 | checkBadCountPagination, |
7 | checkBadSortPagination, | 6 | checkBadSortPagination, |
@@ -12,6 +11,7 @@ import { | |||
12 | PeerTubeServer, | 11 | PeerTubeServer, |
13 | setAccessTokensToServers | 12 | setAccessTokensToServers |
14 | } from '@shared/extra-utils' | 13 | } from '@shared/extra-utils' |
14 | import { HttpStatusCode } from '@shared/models' | ||
15 | 15 | ||
16 | function updateSearchIndex (server: PeerTubeServer, enabled: boolean, disableLocalSearch = false) { | 16 | function updateSearchIndex (server: PeerTubeServer, enabled: boolean, disableLocalSearch = false) { |
17 | return server.config.updateCustomSubConfig({ | 17 | return server.config.updateCustomSubConfig({ |
diff --git a/server/tests/api/check-params/services.ts b/server/tests/api/check-params/services.ts index 973b25598..4c4a5cade 100644 --- a/server/tests/api/check-params/services.ts +++ b/server/tests/api/check-params/services.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { HttpStatusCode } from '@shared/models' | ||
5 | import { | 4 | import { |
6 | cleanupTests, | 5 | cleanupTests, |
7 | createSingleServer, | 6 | createSingleServer, |
@@ -10,7 +9,7 @@ import { | |||
10 | setAccessTokensToServers, | 9 | setAccessTokensToServers, |
11 | setDefaultVideoChannel | 10 | setDefaultVideoChannel |
12 | } from '@shared/extra-utils' | 11 | } from '@shared/extra-utils' |
13 | import { VideoPlaylistPrivacy } from '@shared/models' | 12 | import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models' |
14 | 13 | ||
15 | describe('Test services API validators', function () { | 14 | describe('Test services API validators', function () { |
16 | let server: PeerTubeServer | 15 | let server: PeerTubeServer |
diff --git a/server/tests/api/check-params/user-notifications.ts b/server/tests/api/check-params/user-notifications.ts index 3b709ee5a..17edf5aa1 100644 --- a/server/tests/api/check-params/user-notifications.ts +++ b/server/tests/api/check-params/user-notifications.ts | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { io } from 'socket.io-client' | 4 | import { io } from 'socket.io-client' |
5 | import { HttpStatusCode } from '@shared/models' | ||
6 | import { | 5 | import { |
7 | checkBadCountPagination, | 6 | checkBadCountPagination, |
8 | checkBadSortPagination, | 7 | checkBadSortPagination, |
@@ -16,7 +15,7 @@ import { | |||
16 | setAccessTokensToServers, | 15 | setAccessTokensToServers, |
17 | wait | 16 | wait |
18 | } from '@shared/extra-utils' | 17 | } from '@shared/extra-utils' |
19 | import { UserNotificationSetting, UserNotificationSettingValue } from '@shared/models' | 18 | import { HttpStatusCode, UserNotificationSetting, UserNotificationSettingValue } from '@shared/models' |
20 | 19 | ||
21 | describe('Test user notifications API validators', function () { | 20 | describe('Test user notifications API validators', function () { |
22 | let server: PeerTubeServer | 21 | let server: PeerTubeServer |
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index 34fe309f9..9d8f933db 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { omit } from 'lodash' | 4 | import { omit } from 'lodash' |
5 | import { HttpStatusCode } from '@shared/models' | ||
6 | import { | 5 | import { |
7 | buildAbsoluteFixturePath, | 6 | buildAbsoluteFixturePath, |
8 | checkBadCountPagination, | 7 | checkBadCountPagination, |
@@ -20,7 +19,7 @@ import { | |||
20 | setAccessTokensToServers, | 19 | setAccessTokensToServers, |
21 | UsersCommand | 20 | UsersCommand |
22 | } from '@shared/extra-utils' | 21 | } from '@shared/extra-utils' |
23 | import { UserAdminFlag, UserRole, VideoCreateResult } from '@shared/models' | 22 | import { HttpStatusCode, UserAdminFlag, UserRole, VideoCreateResult } from '@shared/models' |
24 | 23 | ||
25 | describe('Test users API validators', function () { | 24 | describe('Test users API validators', function () { |
26 | const path = '/api/v1/users/' | 25 | const path = '/api/v1/users/' |
diff --git a/server/tests/api/check-params/video-blacklist.ts b/server/tests/api/check-params/video-blacklist.ts index 2072df4b6..d28c6a952 100644 --- a/server/tests/api/check-params/video-blacklist.ts +++ b/server/tests/api/check-params/video-blacklist.ts | |||
@@ -2,22 +2,21 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { expect } from 'chai' | 4 | import { expect } from 'chai' |
5 | import { HttpStatusCode } from '@shared/models' | ||
6 | import { | 5 | import { |
7 | BlacklistCommand, | 6 | BlacklistCommand, |
8 | checkBadCountPagination, | 7 | checkBadCountPagination, |
9 | checkBadSortPagination, | 8 | checkBadSortPagination, |
10 | checkBadStartPagination, | 9 | checkBadStartPagination, |
11 | cleanupTests, | 10 | cleanupTests, |
12 | doubleFollow, | ||
13 | createMultipleServers, | 11 | createMultipleServers, |
12 | doubleFollow, | ||
14 | makePostBodyRequest, | 13 | makePostBodyRequest, |
15 | makePutBodyRequest, | 14 | makePutBodyRequest, |
16 | PeerTubeServer, | 15 | PeerTubeServer, |
17 | setAccessTokensToServers, | 16 | setAccessTokensToServers, |
18 | waitJobs | 17 | waitJobs |
19 | } from '@shared/extra-utils' | 18 | } from '@shared/extra-utils' |
20 | import { VideoBlacklistType } from '@shared/models' | 19 | import { HttpStatusCode, VideoBlacklistType } from '@shared/models' |
21 | 20 | ||
22 | describe('Test video blacklist API validators', function () { | 21 | describe('Test video blacklist API validators', function () { |
23 | let servers: PeerTubeServer[] | 22 | let servers: PeerTubeServer[] |
diff --git a/server/tests/api/check-params/video-captions.ts b/server/tests/api/check-params/video-captions.ts index 1b3d1aa95..5aaeb27fe 100644 --- a/server/tests/api/check-params/video-captions.ts +++ b/server/tests/api/check-params/video-captions.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { HttpStatusCode } from '@shared/models' | ||
5 | import { | 4 | import { |
6 | buildAbsoluteFixturePath, | 5 | buildAbsoluteFixturePath, |
7 | cleanupTests, | 6 | cleanupTests, |
@@ -12,7 +11,7 @@ import { | |||
12 | PeerTubeServer, | 11 | PeerTubeServer, |
13 | setAccessTokensToServers | 12 | setAccessTokensToServers |
14 | } from '@shared/extra-utils' | 13 | } from '@shared/extra-utils' |
15 | import { VideoCreateResult } from '@shared/models' | 14 | import { HttpStatusCode, VideoCreateResult } from '@shared/models' |
16 | 15 | ||
17 | describe('Test video captions API validator', function () { | 16 | describe('Test video captions API validator', function () { |
18 | const path = '/api/v1/videos/' | 17 | const path = '/api/v1/videos/' |
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts index bbe42e43d..2e63916d4 100644 --- a/server/tests/api/check-params/video-channels.ts +++ b/server/tests/api/check-params/video-channels.ts | |||
@@ -3,7 +3,6 @@ | |||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { omit } from 'lodash' | 5 | import { omit } from 'lodash' |
6 | import { HttpStatusCode } from '@shared/models' | ||
7 | import { | 6 | import { |
8 | buildAbsoluteFixturePath, | 7 | buildAbsoluteFixturePath, |
9 | ChannelsCommand, | 8 | ChannelsCommand, |
@@ -19,7 +18,7 @@ import { | |||
19 | PeerTubeServer, | 18 | PeerTubeServer, |
20 | setAccessTokensToServers | 19 | setAccessTokensToServers |
21 | } from '@shared/extra-utils' | 20 | } from '@shared/extra-utils' |
22 | import { VideoChannelUpdate } from '@shared/models' | 21 | import { HttpStatusCode, VideoChannelUpdate } from '@shared/models' |
23 | 22 | ||
24 | const expect = chai.expect | 23 | const expect = chai.expect |
25 | 24 | ||
diff --git a/server/tests/api/check-params/video-comments.ts b/server/tests/api/check-params/video-comments.ts index bfd9e0172..2d9ee1e0d 100644 --- a/server/tests/api/check-params/video-comments.ts +++ b/server/tests/api/check-params/video-comments.ts | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { HttpStatusCode } from '@shared/models' | ||
6 | import { | 5 | import { |
7 | checkBadCountPagination, | 6 | checkBadCountPagination, |
8 | checkBadSortPagination, | 7 | checkBadSortPagination, |
@@ -15,7 +14,7 @@ import { | |||
15 | PeerTubeServer, | 14 | PeerTubeServer, |
16 | setAccessTokensToServers | 15 | setAccessTokensToServers |
17 | } from '@shared/extra-utils' | 16 | } from '@shared/extra-utils' |
18 | import { VideoCreateResult } from '@shared/models' | 17 | import { HttpStatusCode, VideoCreateResult } from '@shared/models' |
19 | 18 | ||
20 | const expect = chai.expect | 19 | const expect = chai.expect |
21 | 20 | ||
diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts index 957556c9b..d6d745488 100644 --- a/server/tests/api/check-params/video-imports.ts +++ b/server/tests/api/check-params/video-imports.ts | |||
@@ -2,7 +2,6 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { omit } from 'lodash' | 4 | import { omit } from 'lodash' |
5 | import { HttpStatusCode } from '@shared/models' | ||
6 | import { | 5 | import { |
7 | buildAbsoluteFixturePath, | 6 | buildAbsoluteFixturePath, |
8 | checkBadCountPagination, | 7 | checkBadCountPagination, |
@@ -17,7 +16,7 @@ import { | |||
17 | PeerTubeServer, | 16 | PeerTubeServer, |
18 | setAccessTokensToServers | 17 | setAccessTokensToServers |
19 | } from '@shared/extra-utils' | 18 | } from '@shared/extra-utils' |
20 | import { VideoPrivacy } from '@shared/models' | 19 | import { HttpStatusCode, VideoPrivacy } from '@shared/models' |
21 | 20 | ||
22 | describe('Test video imports API validator', function () { | 21 | describe('Test video imports API validator', function () { |
23 | const path = '/api/v1/videos/imports' | 22 | const path = '/api/v1/videos/imports' |
diff --git a/server/tests/api/check-params/video-playlists.ts b/server/tests/api/check-params/video-playlists.ts index 7dcb4935a..e4d541b48 100644 --- a/server/tests/api/check-params/video-playlists.ts +++ b/server/tests/api/check-params/video-playlists.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { HttpStatusCode } from '@shared/models' | ||
5 | import { | 4 | import { |
6 | checkBadCountPagination, | 5 | checkBadCountPagination, |
7 | checkBadSortPagination, | 6 | checkBadSortPagination, |
@@ -9,12 +8,13 @@ import { | |||
9 | cleanupTests, | 8 | cleanupTests, |
10 | createSingleServer, | 9 | createSingleServer, |
11 | makeGetRequest, | 10 | makeGetRequest, |
12 | PlaylistsCommand, | ||
13 | PeerTubeServer, | 11 | PeerTubeServer, |
12 | PlaylistsCommand, | ||
14 | setAccessTokensToServers, | 13 | setAccessTokensToServers, |
15 | setDefaultVideoChannel | 14 | setDefaultVideoChannel |
16 | } from '@shared/extra-utils' | 15 | } from '@shared/extra-utils' |
17 | import { | 16 | import { |
17 | HttpStatusCode, | ||
18 | VideoPlaylistCreate, | 18 | VideoPlaylistCreate, |
19 | VideoPlaylistCreateResult, | 19 | VideoPlaylistCreateResult, |
20 | VideoPlaylistElementCreate, | 20 | VideoPlaylistElementCreate, |
diff --git a/server/tests/api/check-params/videos-filter.ts b/server/tests/api/check-params/videos-filter.ts index c2c69904f..d08570bbe 100644 --- a/server/tests/api/check-params/videos-filter.ts +++ b/server/tests/api/check-params/videos-filter.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { HttpStatusCode } from '@shared/models' | ||
5 | import { | 4 | import { |
6 | cleanupTests, | 5 | cleanupTests, |
7 | createSingleServer, | 6 | createSingleServer, |
@@ -10,7 +9,7 @@ import { | |||
10 | setAccessTokensToServers, | 9 | setAccessTokensToServers, |
11 | setDefaultVideoChannel | 10 | setDefaultVideoChannel |
12 | } from '@shared/extra-utils' | 11 | } from '@shared/extra-utils' |
13 | import { UserRole } from '@shared/models' | 12 | import { HttpStatusCode, UserRole } from '@shared/models' |
14 | 13 | ||
15 | async function testEndpoints (server: PeerTubeServer, token: string, filter: string, expectedStatus: HttpStatusCode) { | 14 | async function testEndpoints (server: PeerTubeServer, token: string, filter: string, expectedStatus: HttpStatusCode) { |
16 | const paths = [ | 15 | const paths = [ |
diff --git a/server/tests/api/check-params/videos-history.ts b/server/tests/api/check-params/videos-history.ts index 7283a4d28..c3c309ed2 100644 --- a/server/tests/api/check-params/videos-history.ts +++ b/server/tests/api/check-params/videos-history.ts | |||
@@ -1,7 +1,6 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { HttpStatusCode } from '@shared/models' | ||
5 | import { | 4 | import { |
6 | checkBadCountPagination, | 5 | checkBadCountPagination, |
7 | checkBadStartPagination, | 6 | checkBadStartPagination, |
@@ -13,6 +12,7 @@ import { | |||
13 | PeerTubeServer, | 12 | PeerTubeServer, |
14 | setAccessTokensToServers | 13 | setAccessTokensToServers |
15 | } from '@shared/extra-utils' | 14 | } from '@shared/extra-utils' |
15 | import { HttpStatusCode } from '@shared/models' | ||
16 | 16 | ||
17 | describe('Test videos history API validator', function () { | 17 | describe('Test videos history API validator', function () { |
18 | const myHistoryPath = '/api/v1/users/me/history/videos' | 18 | const myHistoryPath = '/api/v1/users/me/history/videos' |