diff --git a/src/api.js b/src/api.js index 1bc7b33..c7ff408 100644 --- a/src/api.js +++ b/src/api.js @@ -29,7 +29,7 @@ const getShow = (id, credits) => { .catch(error => { console.error(`api error getting show: ${id}`); throw error }) } -const getListByName = (listPath, page) => { +const getTmdbListByPath = (listPath, page) => { const url = `${SEASONED_URL}${listPath}?page=${page}` // TODO - remove. this is temporary fix for user-requests endpoint (also import) const headers = { authorization: storage.token } @@ -37,7 +37,7 @@ const getListByName = (listPath, page) => { .catch(error => { console.error(`api error getting list: ${listPath}, page: ${page}`); throw error }) } -const search = (query, page) => { +const searchTmdb = (query, page) => { const url = `${SEASONED_URL}v2/search?query=${query}&page=${page}` return axios.get(url) .catch(error => { console.error(`api error searching: ${query}, page: ${page}`); throw error }) @@ -140,4 +140,4 @@ const elasticSearchMoviesAndShows = (query) => { -export { getMovie, getShow, getListByName, search, searchTorrents, addMagnet, request, plexAuthenticate, getEmoji, elasticSearchMoviesAndShows } +export { getMovie, getShow, getTmdbListByPath, searchTmdb, searchTorrents, addMagnet, request, plexAuthenticate, getEmoji, elasticSearchMoviesAndShows } diff --git a/src/components/MoviesList.vue b/src/components/MoviesList.vue index b846364..fc718f0 100644 --- a/src/components/MoviesList.vue +++ b/src/components/MoviesList.vue @@ -44,7 +44,7 @@ import MoviesListItem from '@/components/MoviesListItem.vue' import SeasonedButton from '@/components/ui/SeasonedButton.vue' import LoadingPlaceholder from '@/components/ui/LoadingPlaceholder.vue' import Loader from '@/components/ui/Loader.vue' -import { search, getListByName } from '@/api.js' +import { searchTmdb, getTmdbListByPath } from '@/api.js' export default { props: { @@ -136,7 +136,7 @@ export default { }, // TODO these should receive a path not get it from list instance fetchListitems() { - getListByName(this.list.path, this.currentPage) + getTmdbListByPath(this.list.path, this.currentPage) .then(this.parseResponse) .catch(error => { console.error(error) @@ -144,7 +144,7 @@ export default { }) }, fetchSearchItems() { - search(this.query, this.currentPage) + searchTmdb(this.query, this.currentPage) .then(this.parseResponse) },