From 4bbfc6c606c8d3794bae25c64c516120af41f4eb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 29 Jun 2018 11:29:23 +0200 Subject: API: Add ability to update video channel avatar --- server/tests/utils/videos/video-channels.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'server/tests/utils/videos') diff --git a/server/tests/utils/videos/video-channels.ts b/server/tests/utils/videos/video-channels.ts index a064598f4..3ca39469c 100644 --- a/server/tests/utils/videos/video-channels.ts +++ b/server/tests/utils/videos/video-channels.ts @@ -1,5 +1,6 @@ import * as request from 'supertest' import { VideoChannelCreate, VideoChannelUpdate } from '../../../../shared/models/videos' +import { updateAvatarRequest } from '../index' function getVideoChannelsList (url: string, start: number, count: number, sort?: string) { const path = '/api/v1/video-channels' @@ -92,9 +93,22 @@ function getVideoChannel (url: string, channelId: number | string) { .expect('Content-Type', /json/) } +function updateVideoChannelAvatar (options: { + url: string, + accessToken: string, + fixture: string, + videoChannelId: string | number +}) { + + const path = '/api/v1/video-channels/' + options.videoChannelId + '/avatar/pick' + + return updateAvatarRequest(Object.assign(options, { path })) +} + // --------------------------------------------------------------------------- export { + updateVideoChannelAvatar, getVideoChannelsList, getAccountVideoChannelsList, addVideoChannel, -- cgit v1.2.3