diff --git a/README.md b/README.md index c22413f..feb2dcb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# **Aruppi API** (v3.3.7) +# **Aruppi API** (v3.4.1) > This API has everything about Japan, from anime, music, radio, images, videos ... to japanese culture > @@ -73,7 +73,7 @@ But if you need to see the code or the operation of the old version you can do i Aruppi has grown since it was launched and we need to continue improving the application along with the services to be able to give new features. -At this time version 2.6.8 will remain functional until Aruppi App users fully migrate to version 1.5.0 of the app +At this time version 2.6.9 will remain functional until Aruppi App users fully migrate to version 1.5.0 of the app ## **:handshake: Contributing** diff --git a/package-lock.json b/package-lock.json index 478b58a..1130e5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "aruppi", - "version": "3.3.7", + "version": "3.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 34bf67d..d5bfac1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aruppi", - "version": "3.3.7", + "version": "3.4.1", "description": "Aruppi is a custom API to obtain data from the Japanese culture for the mobile app", "main": "./src/api/api.js", "scripts": { diff --git a/src/api/api.js b/src/api/api.js index b131401..6540ea8 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -443,7 +443,8 @@ const getDestAnimePlatforms = async () => { return data.map(doc => ({ id: doc.id, name: doc.name, - logo: doc.logo + logo: doc.logo, + link: doc.link })); }; @@ -461,8 +462,8 @@ 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 }); return data.map(doc => ({ @@ -479,7 +480,6 @@ const getPlatforms = async (id) => { webInfo: doc.webInfo, webpage: doc.webpage })); - } else { data = await homgot(`${BASE_ARUPPI}res/documents/animelegal/type/${id}.json`, { parse: true }); diff --git a/src/api/routes/index.js b/src/api/routes/index.js index 11ac753..5d6ea3b 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'}); diff --git a/src/v2/api/index.js b/src/v2/api/index.js index 487c629..2277027 100644 --- a/src/v2/api/index.js +++ b/src/v2/api/index.js @@ -8,7 +8,7 @@ router.get('/', (req, res) => { res.json({ message: 'Aruppi API - 🎏', author: 'Jéluchu', - version: '2.6.8', + version: '2.6.9', credits: 'The bitch loves APIs that offers data to Aruppi App', deprecated: 'This version will be available until users migrate to Aruppi App v1.5.0', entries: [