Merged in fix/invalidate-uid (pull request #1755)
fix: revalidate with correct uid * fix: revalidate with correct uid Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -23,7 +23,6 @@ const validateJsonBody = z.object({
|
|||||||
data: z.object({
|
data: z.object({
|
||||||
content_type: z.object({
|
content_type: z.object({
|
||||||
uid: z.string(),
|
uid: z.string(),
|
||||||
content_type_uid: z.string(),
|
|
||||||
}),
|
}),
|
||||||
entry: z.object({
|
entry: z.object({
|
||||||
breadcrumbs: z
|
breadcrumbs: z
|
||||||
@@ -91,10 +90,7 @@ export async function POST(request: NextRequest) {
|
|||||||
|
|
||||||
const cacheClient = await getCacheClient()
|
const cacheClient = await getCacheClient()
|
||||||
|
|
||||||
const contentTypeUidTag = generateTag(
|
const contentTypeUidTag = generateTag(entryLocale, content_type.uid)
|
||||||
entryLocale,
|
|
||||||
content_type.content_type_uid
|
|
||||||
)
|
|
||||||
console.info(`Revalidating tag by content_type_uid: ${contentTypeUidTag}`)
|
console.info(`Revalidating tag by content_type_uid: ${contentTypeUidTag}`)
|
||||||
revalidateTag(contentTypeUidTag)
|
revalidateTag(contentTypeUidTag)
|
||||||
await cacheClient.deleteKey(contentTypeUidTag, { fuzzy: true })
|
await cacheClient.deleteKey(contentTypeUidTag, { fuzzy: true })
|
||||||
|
|||||||
Reference in New Issue
Block a user