Fix build

This commit is contained in:
Chocobozzz 2023-11-10 14:14:57 +01:00
parent 7fb1b791ae
commit d50775f88a
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 15 additions and 15 deletions

View File

@ -1,8 +1,8 @@
import axios from 'axios' import axios from 'axios'
import { ResultList, VideoChannelsSearchQuery, VideoPlaylistsSearchQuery, VideosSearchQuery } from '@peertube/peertube-types' import { ResultList, VideoChannelsSearchQuery, VideoPlaylistsSearchQuery, VideosSearchQuery } from '@peertube/peertube-types'
import { EnhancedVideoChannel } from '../../../server/types/channel.model' import { APIVideoChannel } from '../../../server/types/channel.model'
import { EnhancedPlaylist } from '../../../server/types/playlist.model' import { APIPlaylist } from '../../../server/types/playlist.model'
import { EnhancedVideo } from '../../../server/types/video.model' import { APIVideo } from '../../../server/types/video.model'
import { buildApiUrl } from './utils' import { buildApiUrl } from './utils'
const baseVideosPath = '/api/v1/search/videos' const baseVideosPath = '/api/v1/search/videos'
@ -18,7 +18,7 @@ function searchVideos (options: VideosSearchQuery) {
} }
} }
return axios.get<ResultList<EnhancedVideo>>(buildApiUrl(baseVideosPath), axiosOptions) return axios.get<ResultList<APIVideo>>(buildApiUrl(baseVideosPath), axiosOptions)
.then(res => res.data) .then(res => res.data)
} }
@ -31,7 +31,7 @@ function searchVideoChannels (options: VideoChannelsSearchQuery) {
} }
} }
return axios.get<ResultList<EnhancedVideoChannel>>(buildApiUrl(baseVideoChannelsPath), axiosOptions) return axios.get<ResultList<APIVideoChannel>>(buildApiUrl(baseVideoChannelsPath), axiosOptions)
.then(res => res.data) .then(res => res.data)
} }
@ -44,7 +44,7 @@ function searchVideoPlaylists (options: VideoPlaylistsSearchQuery) {
} }
} }
return axios.get<ResultList<EnhancedPlaylist>>(buildApiUrl(baseVideoPlaylistsPath), axiosOptions) return axios.get<ResultList<APIPlaylist>>(buildApiUrl(baseVideoPlaylistsPath), axiosOptions)
.then(res => res.data) .then(res => res.data)
} }

View File

@ -133,14 +133,14 @@
import { getConfig } from '../shared/config' import { getConfig } from '../shared/config'
import { pageToAPIParams, durationRangeToAPIParams, publishedDateRangeToAPIParams, extractTagsFromQuery, extractQueryToIntArray, extractQueryToStringArray, extractQueryToInt, extractQueryToBoolean } from '../shared/utils' import { pageToAPIParams, durationRangeToAPIParams, publishedDateRangeToAPIParams, extractTagsFromQuery, extractQueryToIntArray, extractQueryToStringArray, extractQueryToInt, extractQueryToBoolean } from '../shared/utils'
import { SearchUrl } from '../models' import { SearchUrl } from '../models'
import { EnhancedVideo } from '../../../server/types/video.model' import { APIVideo } from '../../../server/types/video.model'
import { EnhancedVideoChannel } from '../../../server/types/channel.model' import { APIVideoChannel } from '../../../server/types/channel.model'
import Pagination from '../components/Pagination.vue' import Pagination from '../components/Pagination.vue'
import SearchInput from '../components/SearchInput.vue' import SearchInput from '../components/SearchInput.vue'
import SortButton from '../components/SortButton.vue' import SortButton from '../components/SortButton.vue'
import { VideoChannelsSearchQuery, ResultList, VideosSearchQuery } from '@peertube/peertube-types' import { VideoChannelsSearchQuery, ResultList, VideosSearchQuery } from '@peertube/peertube-types'
import Nprogress from 'nprogress' import Nprogress from 'nprogress'
import { EnhancedPlaylist } from '../../../server/types/playlist.model' import { APIPlaylist } from '../../../server/types/playlist.model'
import { PlaylistsSearchQuery } from '../../../server/types/search-query/playlist-search.model' import { PlaylistsSearchQuery } from '../../../server/types/search-query/playlist-search.model'
export default defineComponent({ export default defineComponent({
@ -166,13 +166,13 @@
totalResults: null as number, totalResults: null as number,
totalVideos: null as number, totalVideos: null as number,
videos: null as EnhancedVideo[], videos: null as APIVideo[],
totalChannels: null as number, totalChannels: null as number,
channels: null as EnhancedVideoChannel[], channels: null as APIVideoChannel[],
totalPlaylists: null as number, totalPlaylists: null as number,
playlists: null as EnhancedPlaylist[], playlists: null as APIPlaylist[],
currentPage: 1, currentPage: 1,
pages: [], pages: [],
@ -385,7 +385,7 @@
} as PlaylistsSearchQuery } as PlaylistsSearchQuery
}, },
searchVideos (): Promise<ResultList<EnhancedVideo>> { searchVideos (): Promise<ResultList<APIVideo>> {
if (this.isVideoSearchDisabled()) { if (this.isVideoSearchDisabled()) {
return Promise.resolve({ total: 0, data: [] }) return Promise.resolve({ total: 0, data: [] })
} }
@ -395,7 +395,7 @@
return searchVideos(query) return searchVideos(query)
}, },
searchChannels (): Promise<ResultList<EnhancedVideoChannel>> { searchChannels (): Promise<ResultList<APIVideoChannel>> {
if (this.isChannelSearchDisabled()) { if (this.isChannelSearchDisabled()) {
return Promise.resolve({ data: [], total: 0 }) return Promise.resolve({ data: [], total: 0 })
} }
@ -405,7 +405,7 @@
return searchVideoChannels(query) return searchVideoChannels(query)
}, },
searchPlaylists (): Promise<ResultList<EnhancedPlaylist>> { searchPlaylists (): Promise<ResultList<APIPlaylist>> {
if (this.isPlaylistSearchDisabled()) { if (this.isPlaylistSearchDisabled()) {
return Promise.resolve({ data: [], total: 0 }) return Promise.resolve({ data: [], total: 0 })
} }