aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos/video-channels.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-01-31 16:56:52 +0100
committerChocobozzz <me@florianbigard.com>2020-02-03 08:31:02 +0100
commita15871560f80e07386c1dabb8370cd2664ecfd1f (patch)
tree44440e140c9e43b0d7f97ade777a76e649e0553d /shared/extra-utils/videos/video-channels.ts
parenta22046d166805222ca76060e471b6cb3d419a32d (diff)
downloadPeerTube-a15871560f80e07386c1dabb8370cd2664ecfd1f.tar.gz
PeerTube-a15871560f80e07386c1dabb8370cd2664ecfd1f.tar.zst
PeerTube-a15871560f80e07386c1dabb8370cd2664ecfd1f.zip
Move to eslintcontain
Diffstat (limited to 'shared/extra-utils/videos/video-channels.ts')
-rw-r--r--shared/extra-utils/videos/video-channels.ts20
1 files changed, 11 insertions, 9 deletions
diff --git a/shared/extra-utils/videos/video-channels.ts b/shared/extra-utils/videos/video-channels.ts
index 053842331..51d433940 100644
--- a/shared/extra-utils/videos/video-channels.ts
+++ b/shared/extra-utils/videos/video-channels.ts
@@ -1,3 +1,5 @@
1/* eslint-disable @typescript-eslint/no-floating-promises */
2
1import * as request from 'supertest' 3import * as request from 'supertest'
2import { VideoChannelUpdate } from '../../models/videos/channel/video-channel-update.model' 4import { VideoChannelUpdate } from '../../models/videos/channel/video-channel-update.model'
3import { VideoChannelCreate } from '../../models/videos/channel/video-channel-create.model' 5import { VideoChannelCreate } from '../../models/videos/channel/video-channel-create.model'
@@ -22,11 +24,11 @@ function getVideoChannelsList (url: string, start: number, count: number, sort?:
22} 24}
23 25
24function getAccountVideoChannelsList (parameters: { 26function getAccountVideoChannelsList (parameters: {
25 url: string, 27 url: string
26 accountName: string, 28 accountName: string
27 start?: number, 29 start?: number
28 count?: number, 30 count?: number
29 sort?: string, 31 sort?: string
30 specialStatus?: number 32 specialStatus?: number
31}) { 33}) {
32 const { url, accountName, start, count, sort = 'createdAt', specialStatus = 200 } = parameters 34 const { url, accountName, start, count, sort = 'createdAt', specialStatus = 200 } = parameters
@@ -113,9 +115,9 @@ function getVideoChannel (url: string, channelName: string) {
113} 115}
114 116
115function updateVideoChannelAvatar (options: { 117function updateVideoChannelAvatar (options: {
116 url: string, 118 url: string
117 accessToken: string, 119 accessToken: string
118 fixture: string, 120 fixture: string
119 videoChannelName: string | number 121 videoChannelName: string | number
120}) { 122}) {
121 123
@@ -129,7 +131,7 @@ function setDefaultVideoChannel (servers: ServerInfo[]) {
129 131
130 for (const server of servers) { 132 for (const server of servers) {
131 const p = getMyUserInformation(server.url, server.accessToken) 133 const p = getMyUserInformation(server.url, server.accessToken)
132 .then(res => server.videoChannel = (res.body as User).videoChannels[0]) 134 .then(res => { server.videoChannel = (res.body as User).videoChannels[0] })
133 135
134 tasks.push(p) 136 tasks.push(p)
135 } 137 }