Library items updates also update the parent items
This commit is contained in:
parent
c98537c85e
commit
31d68dc6ae
|
@ -47,6 +47,11 @@ type HookLibraryItem = {
|
||||||
model: "library-item";
|
model: "library-item";
|
||||||
entry: {
|
entry: {
|
||||||
slug: string;
|
slug: string;
|
||||||
|
subitem_of: [
|
||||||
|
{
|
||||||
|
slug: string;
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -94,6 +99,9 @@ export default async function Mail(
|
||||||
paths.push(`/library/${body.entry.slug}`);
|
paths.push(`/library/${body.entry.slug}`);
|
||||||
serverRuntimeConfig.locales?.map((locale: string) => {
|
serverRuntimeConfig.locales?.map((locale: string) => {
|
||||||
paths.push(`/${locale}/library/${body.entry.slug}`);
|
paths.push(`/${locale}/library/${body.entry.slug}`);
|
||||||
|
body.entry.subitem_of.map((parentItem) => {
|
||||||
|
paths.push(`/${locale}/library/${parentItem.slug}`);
|
||||||
|
});
|
||||||
paths.push(`/${locale}/library`);
|
paths.push(`/${locale}/library`);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
@ -147,7 +155,7 @@ export default async function Mail(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.table(paths);
|
//console.table(paths);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Promise.all(
|
Promise.all(
|
||||||
|
|
Loading…
Reference in New Issue