diff --git a/README.md b/README.md index 2f75355..3e4b82f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# **Aruppi API** (v3.2.5) +# **Aruppi API** (v3.2.6) > This API has everything about Japan, from anime, music, radio, images, videos ... to japanese culture > diff --git a/package.json b/package.json index 1f5a0d1..32e31b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aruppi", - "version": "3.2.5", + "version": "3.2.6", "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 bd125fb..66f858f 100644 --- a/src/api/api.js +++ b/src/api/api.js @@ -50,7 +50,16 @@ const top = async (top) =>{ data = await homgot(`${BASE_JIKAN}top/${top.type}/${top.page}`, { parse: true }); } - return data.top + return data.top.map(doc =>({ + rank: doc.rank, + title: doc.title, + url: doc.url, + image_url: doc.image_url, + type: top.type, + subtype: top.subtype, + page: top.page, + score: doc.score + })); }; @@ -438,7 +447,7 @@ const getAnimeGenres = async(genres) => { for (let i = 0; i <= data.length - 1; i++) { promises.push({ id: data[i].id || null, - title: data[i].title || null, + title: data[i].title.trim() || null, mention: genres.genre, page: genres.page, poster: data[i].poster || null,