fix: add missing globals migration and await seed
This commit is contained in:
+25
-1
@@ -220,6 +220,30 @@ async function seedGlobals(payload: Awaited<ReturnType<typeof getPayload>>) {
|
||||
},
|
||||
});
|
||||
console.log(" ↺ Global „Termin buchen“ gesetzt");
|
||||
|
||||
await payload.updateGlobal({
|
||||
slug: "cookie-settings",
|
||||
data: {
|
||||
consentVersion: "1.0",
|
||||
necessary: {
|
||||
label: "Notwendig",
|
||||
description:
|
||||
"Für den Betrieb der Website technisch erforderlich (z. B. Login, Sitzung). Kann nicht deaktiviert werden.",
|
||||
},
|
||||
preferences: {
|
||||
label: "Präferenzen",
|
||||
description: "Speichert Einstellungen wie z. B. bevorzugte Anzeigeoptionen.",
|
||||
enabled: true,
|
||||
},
|
||||
statistics: {
|
||||
label: "Statistik",
|
||||
description:
|
||||
"Anonymisierte, datensparsame Reichweitenmessung (Seitenaufrufe, Ereignisse) ohne personenbezogene Profile.",
|
||||
enabled: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(" ↺ Global „Cookie-Einstellungen“ gesetzt");
|
||||
}
|
||||
|
||||
async function run() {
|
||||
@@ -235,7 +259,7 @@ async function run() {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
run().catch((err) => {
|
||||
await run().catch((err) => {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user