diff options
Diffstat (limited to 'shared/server-commands/videos')
-rw-r--r-- | shared/server-commands/videos/live-command.ts | 5 | ||||
-rw-r--r-- | shared/server-commands/videos/playlists-command.ts | 7 | ||||
-rw-r--r-- | shared/server-commands/videos/videos-command.ts | 5 |
3 files changed, 7 insertions, 10 deletions
diff --git a/shared/server-commands/videos/live-command.ts b/shared/server-commands/videos/live-command.ts index 3df47ed4d..d804fd883 100644 --- a/shared/server-commands/videos/live-command.ts +++ b/shared/server-commands/videos/live-command.ts | |||
@@ -1,9 +1,8 @@ | |||
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 { readdir } from 'fs-extra' | 3 | import { readdir } from 'fs-extra' |
4 | import { omit } from 'lodash' | ||
5 | import { join } from 'path' | 4 | import { join } from 'path' |
6 | import { wait } from '@shared/core-utils' | 5 | import { omit, wait } from '@shared/core-utils' |
7 | import { | 6 | import { |
8 | HttpStatusCode, | 7 | HttpStatusCode, |
9 | LiveVideo, | 8 | LiveVideo, |
@@ -103,7 +102,7 @@ export class LiveCommand extends AbstractCommand { | |||
103 | 102 | ||
104 | path, | 103 | path, |
105 | attaches, | 104 | attaches, |
106 | fields: omit(fields, 'thumbnailfile', 'previewfile'), | 105 | fields: omit(fields, [ 'thumbnailfile', 'previewfile' ]), |
107 | implicitToken: true, | 106 | implicitToken: true, |
108 | defaultExpectedStatus: HttpStatusCode.OK_200 | 107 | defaultExpectedStatus: HttpStatusCode.OK_200 |
109 | })) | 108 | })) |
diff --git a/shared/server-commands/videos/playlists-command.ts b/shared/server-commands/videos/playlists-command.ts index ce23900d3..516da0bf7 100644 --- a/shared/server-commands/videos/playlists-command.ts +++ b/shared/server-commands/videos/playlists-command.ts | |||
@@ -1,5 +1,4 @@ | |||
1 | import { omit } from 'lodash' | 1 | import { omit, pick } from '@shared/core-utils' |
2 | import { pick } from '@shared/core-utils' | ||
3 | import { | 2 | import { |
4 | BooleanBothQuery, | 3 | BooleanBothQuery, |
5 | HttpStatusCode, | 4 | HttpStatusCode, |
@@ -136,7 +135,7 @@ export class PlaylistsCommand extends AbstractCommand { | |||
136 | }) { | 135 | }) { |
137 | const path = '/api/v1/video-playlists' | 136 | const path = '/api/v1/video-playlists' |
138 | 137 | ||
139 | const fields = omit(options.attributes, 'thumbnailfile') | 138 | const fields = omit(options.attributes, [ 'thumbnailfile' ]) |
140 | 139 | ||
141 | const attaches = options.attributes.thumbnailfile | 140 | const attaches = options.attributes.thumbnailfile |
142 | ? { thumbnailfile: options.attributes.thumbnailfile } | 141 | ? { thumbnailfile: options.attributes.thumbnailfile } |
@@ -161,7 +160,7 @@ export class PlaylistsCommand extends AbstractCommand { | |||
161 | }) { | 160 | }) { |
162 | const path = '/api/v1/video-playlists/' + options.playlistId | 161 | const path = '/api/v1/video-playlists/' + options.playlistId |
163 | 162 | ||
164 | const fields = omit(options.attributes, 'thumbnailfile') | 163 | const fields = omit(options.attributes, [ 'thumbnailfile' ]) |
165 | 164 | ||
166 | const attaches = options.attributes.thumbnailfile | 165 | const attaches = options.attributes.thumbnailfile |
167 | ? { thumbnailfile: options.attributes.thumbnailfile } | 166 | ? { thumbnailfile: options.attributes.thumbnailfile } |
diff --git a/shared/server-commands/videos/videos-command.ts b/shared/server-commands/videos/videos-command.ts index c0b36d95b..168391523 100644 --- a/shared/server-commands/videos/videos-command.ts +++ b/shared/server-commands/videos/videos-command.ts | |||
@@ -3,9 +3,8 @@ | |||
3 | import { expect } from 'chai' | 3 | import { expect } from 'chai' |
4 | import { createReadStream, stat } from 'fs-extra' | 4 | import { createReadStream, stat } from 'fs-extra' |
5 | import got, { Response as GotResponse } from 'got' | 5 | import got, { Response as GotResponse } from 'got' |
6 | import { omit } from 'lodash' | ||
7 | import validator from 'validator' | 6 | import validator from 'validator' |
8 | import { buildAbsoluteFixturePath, pick, wait } from '@shared/core-utils' | 7 | import { buildAbsoluteFixturePath, omit, pick, wait } from '@shared/core-utils' |
9 | import { buildUUID } from '@shared/extra-utils' | 8 | import { buildUUID } from '@shared/extra-utils' |
10 | import { | 9 | import { |
11 | HttpStatusCode, | 10 | HttpStatusCode, |
@@ -484,7 +483,7 @@ export class VideosCommand extends AbstractCommand { | |||
484 | }, | 483 | }, |
485 | 484 | ||
486 | // Fixture will be sent later | 485 | // Fixture will be sent later |
487 | attaches: this.buildUploadAttaches(omit(options.attributes, 'fixture')), | 486 | attaches: this.buildUploadAttaches(omit(options.attributes, [ 'fixture' ])), |
488 | implicitToken: true, | 487 | implicitToken: true, |
489 | 488 | ||
490 | defaultExpectedStatus: null | 489 | defaultExpectedStatus: null |