mirror of
https://github.com/romancm/gamebrary
synced 2024-11-10 05:34:15 +00:00
Expand fields in igdb search endpoint
This commit is contained in:
parent
fe12b0b4f6
commit
c8ae6f1aba
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ exports.search = functions.https.onRequest((req, res) => {
|
|||
|
||||
const { searchText, platformId } = req.query;
|
||||
|
||||
axios.get(`${igdbUrl}/games/?search=${searchText}&fields=*&filter[platforms][eq]=${platformId}&limit=20&order=popularity:desc`)
|
||||
axios.get(`${igdbUrl}/games/?search=${searchText}&fields=id,name,slug,created_at,updated_at,summary,rating,category,player_perspectives,release_dates,name,cover,platforms,screenshots,videos,websites,esrb,pegi,themes.name,game.name&expand=game,themes,developers,publishers,game_engines,game_modes,genres,platforms,player_perspectives&filter[platforms][eq]=${platformId}&limit=20&order=popularity:desc`)
|
||||
.then(({ data }) => { res.status(200).send(data) })
|
||||
.catch(() => { res.send(400) });
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue