From ad9e39fb815d85e5e718c40540fa75471474fa17 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 25 May 2018 09:57:16 +0200 Subject: Only use account name in routes --- server/tests/utils/users/accounts.ts | 4 ++-- server/tests/utils/videos/video-channels.ts | 4 ++-- server/tests/utils/videos/videos.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'server/tests/utils') diff --git a/server/tests/utils/users/accounts.ts b/server/tests/utils/users/accounts.ts index a5c13c319..30b3c54f8 100644 --- a/server/tests/utils/users/accounts.ts +++ b/server/tests/utils/users/accounts.ts @@ -19,8 +19,8 @@ function getAccountsList (url: string, sort = '-createdAt', statusCodeExpected = }) } -function getAccount (url: string, accountId: number | string, statusCodeExpected = 200) { - const path = '/api/v1/accounts/' + accountId +function getAccount (url: string, accountName: string, statusCodeExpected = 200) { + const path = '/api/v1/accounts/' + accountName return makeGetRequest({ url, diff --git a/server/tests/utils/videos/video-channels.ts b/server/tests/utils/videos/video-channels.ts index 021c4c420..a064598f4 100644 --- a/server/tests/utils/videos/video-channels.ts +++ b/server/tests/utils/videos/video-channels.ts @@ -16,8 +16,8 @@ function getVideoChannelsList (url: string, start: number, count: number, sort?: .expect('Content-Type', /json/) } -function getAccountVideoChannelsList (url: string, accountId: number | string, specialStatus = 200) { - const path = '/api/v1/accounts/' + accountId + '/video-channels' +function getAccountVideoChannelsList (url: string, accountName: string, specialStatus = 200) { + const path = '/api/v1/accounts/' + accountName + '/video-channels' return request(url) .get(path) diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts index 07c4ffc77..46fa5f79d 100644 --- a/server/tests/utils/videos/videos.ts +++ b/server/tests/utils/videos/videos.ts @@ -167,8 +167,8 @@ function getMyVideos (url: string, accessToken: string, start: number, count: nu .expect('Content-Type', /json/) } -function getAccountVideos (url: string, accessToken: string, accountId: number | string, start: number, count: number, sort?: string) { - const path = '/api/v1/accounts/' + accountId + '/videos' +function getAccountVideos (url: string, accessToken: string, accountName: string, start: number, count: number, sort?: string) { + const path = '/api/v1/accounts/' + accountName + '/videos' return makeGetRequest({ url, -- cgit v1.2.3