Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Commit

Permalink
fixed redis
Browse files Browse the repository at this point in the history
  • Loading branch information
Aijazmakerb authored Oct 22, 2023
1 parent 4604f8f commit dbc2170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/api/v2/episode/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export default async function handler(req, res) {
if (meta) {
data = await appendMetaToEpisodes(filteredData, JSON.parse(meta));
} else if (cover && !cover.some((e) => e.img === null)) {
await redis.set(`meta:${id}`, JSON.stringify(cover));
if (redis) await redis.set(`meta:${id}`, JSON.stringify(cover));
data = await appendMetaToEpisodes(filteredData, cover);
}

Expand Down

0 comments on commit dbc2170

Please sign in to comment.