import * as request from 'supertest'
-import { VideoChannelCreate, VideoChannelUpdate } from '../../models/videos'
+import { VideoChannelUpdate } from '../../models/videos/channel/video-channel-update.model'
+import { VideoChannelCreate } from '../../models/videos/channel/video-channel-create.model'
import { makeGetRequest, updateAvatarRequest } from '../requests/requests'
-import { getMyUserInformation, ServerInfo } from '..'
-import { User } from '../..'
+import { ServerInfo } from '../server/servers'
+import { User } from '../../models/users/user.model'
+import { getMyUserInformation } from '../users/users'
function getVideoChannelsList (url: string, start: number, count: number, sort?: string) {
const path = '/api/v1/video-channels'
attributes: VideoChannelUpdate,
expectedStatus = 204
) {
- const body = {}
+ const body: any = {}
const path = '/api/v1/video-channels/' + channelName
- if (attributes.displayName) body['displayName'] = attributes.displayName
- if (attributes.description) body['description'] = attributes.description
- if (attributes.support) body['support'] = attributes.support
+ if (attributes.displayName) body.displayName = attributes.displayName
+ if (attributes.description) body.description = attributes.description
+ if (attributes.support) body.support = attributes.support
+ if (attributes.bulkVideosSupportUpdate) body.bulkVideosSupportUpdate = attributes.bulkVideosSupportUpdate
return request(url)
.put(path)