diff --git a/src/api/api.js b/src/api/api.js index 7165fb6..0023aa2 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -281,7 +281,7 @@ const getAnimeServers = async (id) => { return await videoServersJK(id); } else { const data = await homgot(`${BASE_ANIMEFLV_JELU}GetAnimeServers/${id}`, { parse: true }); - + return await transformUrlServer(data.servers); } }; @@ -426,7 +426,8 @@ const getDestAnimePlatforms = async () => { return data.map(doc =>({ id: doc.id, name: doc.name, - logo: doc.logo + logo: doc.logo, + link: doc.link })); }; @@ -444,7 +445,7 @@ const getPlatforms = async (id) => { cover: doc.cover })); - } if (id === "producers" || id === "apps" || id === "publishers") { + } if (id === "producers" || id === "apps" || id === "publishers" || "events") { data = await homgot(`${BASE_ARUPPI}res/documents/animelegal/type/${id}.json`, { parse: true }); @@ -460,7 +461,9 @@ const getPlatforms = async (id) => { twitter: doc.twitter, instagram: doc.instagram, webInfo: doc.webInfo, - webpage: doc.webpage + webpage: doc.webpage, + latitude: doc.latitude || null, + longitude: doc.longitude || null })); } else { diff --git a/src/api/routes/index.js b/src/api/routes/index.js index d661930..c336b39 100644 --- a/src/api/routes/index.js +++ b/src/api/routes/index.js @@ -274,7 +274,7 @@ router.get('/moreInfo/:title' , (req, res) =>{ res.status(200).json(info); } else { res.status(500).json({ message: 'Aruppi lost in the shell'}); - } + } }).catch((err) =>{ console.error(err); }); @@ -287,14 +287,14 @@ router.get('/getEpisodes/:title' , (req, res) =>{ api.getEpisodes(title) .then(episodes => { - + if (episodes.length > 0) { res.status(200).json({episodes}); } else { res.status(500).json({ message: 'Aruppi lost in the shell'}); } }).catch((err) =>{ - + console.error(err); }); @@ -519,6 +519,7 @@ router.get('/randomAnime', (req, res) => { api.getRandomAnime() .then(anime => { if (anime) { + res.set('Cache-Control', 'no-store'); res.status(200).json(anime); }else { res.status(500).json({ message: 'Aruppi lost in the shell'});