Skip to content

Commit

Permalink
clear cache when like
Browse files Browse the repository at this point in the history
  • Loading branch information
GraemeFulton committed Jun 13, 2024
1 parent c90eaa2 commit b44913c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/api/revalidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const clearPostCacheByLike = async (likeId, res) => {
response?.data?.data?.attributes?.post?.data?.attributes?.slug;

if (postSlug) {
let url = `/post/${postSlug}`;
let url = `/toolbox/${postSlug}`;
await res.revalidate(url);
if (process.env.NODE_ENV == "production") {
await purgeCloudFlareCache(url);
Expand Down

0 comments on commit b44913c

Please sign in to comment.