Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
the-kwisatz-haderach committed Jan 18, 2024
1 parent 16bbba2 commit 80e5c5a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pages/api/storyblok/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ router.post(async (req: EnhancedNextApiRequest, res: NextApiResponse) => {
}
case 'deleted':
case 'unpublished': {
if (event.full_slug) {
const path =
event.full_slug === 'home' ? '/' : '/' + event.full_slug
await res.revalidate(path)
return res.status(200).json({ revalidated: true })
}
// if (event.full_slug) {
// const path =
// event.full_slug === 'home' ? '/' : '/' + event.full_slug
// await res.revalidate(path)
// return res.status(200).json({ revalidated: true })
// }
const result = await req.db
.collection('obituaries')
.deleteOne({ storyId: event.story_id })
Expand Down

1 comment on commit 80e5c5a

@vercel
Copy link

@vercel vercel bot commented on 80e5c5a Jan 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.