diff --git a/index.js b/index.js index 2c5e8a3..aeec4ed 100644 --- a/index.js +++ b/index.js @@ -32,11 +32,11 @@ app.get("/", async (req, res) => { const random = Math.floor(Math.random() * list.length); const response = await axios.get(MAL_URL + 'anime/' + list[random].id + MAL_FIELDS, MAL_HEADER); const data = response.data; - console.log(data); + const genres = data.genres.map((genre) => genre.name); const anime = { title: data.title, poster: data.main_picture.large, - genre: data.genres[0].name, + genre: genres, synopsis: data.synopsis, rating: data.mean, status: data.status, diff --git a/views/index.ejs b/views/index.ejs index 8200f0c..e8c75d7 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -47,6 +47,7 @@