aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/search
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/search')
-rw-r--r--shared/extra-utils/search/search-command.ts15
1 files changed, 6 insertions, 9 deletions
diff --git a/shared/extra-utils/search/search-command.ts b/shared/extra-utils/search/search-command.ts
index d4cfab32b..7539a21ec 100644
--- a/shared/extra-utils/search/search-command.ts
+++ b/shared/extra-utils/search/search-command.ts
@@ -25,16 +25,15 @@ export class SearchCommand extends AbstractCommand {
25 advancedChannelSearch (options: OverrideCommandOptions & { 25 advancedChannelSearch (options: OverrideCommandOptions & {
26 search: VideoChannelsSearchQuery 26 search: VideoChannelsSearchQuery
27 }) { 27 }) {
28 const { search, token } = options 28 const { search } = options
29 const path = '/api/v1/search/video-channels' 29 const path = '/api/v1/search/video-channels'
30 30
31 return this.getRequestBody<ResultList<VideoChannel>>({ 31 return this.getRequestBody<ResultList<VideoChannel>>({
32 ...options, 32 ...options,
33 33
34 token: token || null,
35
36 path, 34 path,
37 query: search, 35 query: search,
36 implicitToken: false,
38 defaultExpectedStatus: HttpStatusCode.OK_200 37 defaultExpectedStatus: HttpStatusCode.OK_200
39 }) 38 })
40 } 39 }
@@ -52,16 +51,15 @@ export class SearchCommand extends AbstractCommand {
52 advancedPlaylistSearch (options: OverrideCommandOptions & { 51 advancedPlaylistSearch (options: OverrideCommandOptions & {
53 search: VideoPlaylistsSearchQuery 52 search: VideoPlaylistsSearchQuery
54 }) { 53 }) {
55 const { search, token } = options 54 const { search } = options
56 const path = '/api/v1/search/video-playlists' 55 const path = '/api/v1/search/video-playlists'
57 56
58 return this.getRequestBody<ResultList<VideoPlaylist>>({ 57 return this.getRequestBody<ResultList<VideoPlaylist>>({
59 ...options, 58 ...options,
60 59
61 token: token || null,
62
63 path, 60 path,
64 query: search, 61 query: search,
62 implicitToken: false,
65 defaultExpectedStatus: HttpStatusCode.OK_200 63 defaultExpectedStatus: HttpStatusCode.OK_200
66 }) 64 })
67 } 65 }
@@ -85,16 +83,15 @@ export class SearchCommand extends AbstractCommand {
85 advancedVideoSearch (options: OverrideCommandOptions & { 83 advancedVideoSearch (options: OverrideCommandOptions & {
86 search: VideosSearchQuery 84 search: VideosSearchQuery
87 }) { 85 }) {
88 const { search, token } = options 86 const { search } = options
89 const path = '/api/v1/search/videos' 87 const path = '/api/v1/search/videos'
90 88
91 return this.getRequestBody<ResultList<Video>>({ 89 return this.getRequestBody<ResultList<Video>>({
92 ...options, 90 ...options,
93 91
94 token: token || null,
95
96 path, 92 path,
97 query: search, 93 query: search,
94 implicitToken: false,
98 defaultExpectedStatus: HttpStatusCode.OK_200 95 defaultExpectedStatus: HttpStatusCode.OK_200
99 }) 96 })
100 } 97 }