Skip to content

Commit

Permalink
trying to resolve cache issue for watchlist 5 adding logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafabereket committed Dec 30, 2024
1 parent 4b1d9f1 commit fab4731
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/api/movie-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ export const fetchWatchlistMovies = async () => {
});

const data = await resp.json();

console.log("fetchWatchlistMovies", data);
return data;
} catch (err) {
console.log("fetchWatchlistMovies", err);
return { results: [], error: err };
}
};
Expand Down
3 changes: 3 additions & 0 deletions app/api/watchlist/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ export const GET = async () => {
});
const data = await res.json();

console.log("GET:::", data);

return new NextResponse(JSON.stringify(data), { status: 200 });
} catch (error) {
console.log("GET:::ERROR::: ", error);
return new NextResponse(JSON.stringify(error), { status: 500 });
}
};

0 comments on commit fab4731

Please sign in to comment.