From 89d241a79c262b9775c233b73cff080043ebb5e6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 16 Jul 2021 09:04:35 +0200 Subject: Shorter server command names --- scripts/benchmark.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/benchmark.ts b/scripts/benchmark.ts index d9e4a08ab..1d980063b 100644 --- a/scripts/benchmark.ts +++ b/scripts/benchmark.ts @@ -210,29 +210,29 @@ async function prepare () { } for (let i = 0; i < 10; i++) { - await server.videosCommand.upload({ attributes: { ...attributes, name: 'my super video ' + i } }) + await server.videos.upload({ attributes: { ...attributes, name: 'my super video ' + i } }) } - const { data } = await server.videosCommand.list() + const { data } = await server.videos.list() video = data.find(v => v.name === 'my super video 1') for (let i = 0; i < 10; i++) { const text = 'my super first comment' - const created = await server.commentsCommand.createThread({ videoId: video.id, text }) + const created = await server.comments.createThread({ videoId: video.id, text }) threadId = created.id const text1 = 'my super answer to thread 1' - const child = await server.commentsCommand.addReply({ videoId: video.id, toCommentId: threadId, text: text1 }) + const child = await server.comments.addReply({ videoId: video.id, toCommentId: threadId, text: text1 }) const text2 = 'my super answer to answer of thread 1' - await server.commentsCommand.addReply({ videoId: video.id, toCommentId: child.id, text: text2 }) + await server.comments.addReply({ videoId: video.id, toCommentId: child.id, text: text2 }) const text3 = 'my second answer to thread 1' - await server.commentsCommand.addReply({ videoId: video.id, toCommentId: threadId, text: text3 }) + await server.comments.addReply({ videoId: video.id, toCommentId: threadId, text: text3 }) } for (const caption of [ 'ar', 'fr', 'en', 'zh' ]) { - await server.captionsCommand.createVideoCaption({ + await server.captions.createVideoCaption({ language: caption, videoId: video.id, fixture: 'subtitle-good2.vtt' -- cgit v1.2.3