diff options
Diffstat (limited to 'pages/api/v2/info/index.js')
| -rw-r--r-- | pages/api/v2/info/index.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pages/api/v2/info/index.js b/pages/api/v2/info/index.js index 39795d3..4bebfae 100644 --- a/pages/api/v2/info/index.js +++ b/pages/api/v2/info/index.js @@ -7,7 +7,7 @@ export async function fetchInfo(id) { try { // console.log(id); const { data } = await axios - .get(`https://api.anify.tv/info/${id}?apikey=${API_KEY}`) + .get(`https://api.anify.tv/info/${id}`) .catch((err) => { return { data: null, @@ -19,7 +19,7 @@ export async function fetchInfo(id) { } const { data: Chapters } = await axios.get( - `https://api.anify.tv/chapters/${data.id}?apikey=${API_KEY}` + `https://api.anify.tv/chapters/${data.id}` ); if (!Chapters) { @@ -53,7 +53,8 @@ export default async function handler(req, res) { return res.status(404).json({ error: "Manga not found" }); } - if (redis) await redis.set(`manga:${id}`, JSON.stringify(manga), "ex", 60 * 60 * 24); + if (redis) + await redis.set(`manga:${id}`, JSON.stringify(manga), "ex", 60 * 60 * 24); res.status(200).json(manga); } catch (error) { |