feat: product catalog
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Failing after 2m15s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Failing after 2m15s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
This commit is contained in:
17
scripts/inspect-pages.ts
Normal file
17
scripts/inspect-pages.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { getPayload } from "payload";
|
||||
import configPromise from "@payload-config";
|
||||
|
||||
async function run() {
|
||||
const payload = await getPayload({ config: configPromise });
|
||||
const resEn = await payload.find({ collection: "pages", locale: "en" as any });
|
||||
const resDe = await payload.find({ collection: "pages", locale: "de" as any });
|
||||
|
||||
console.log("EN Pages:");
|
||||
resEn.docs.forEach(d => console.log(`- ${d.slug}: ${d.title}`));
|
||||
console.log("DE Pages:");
|
||||
resDe.docs.forEach(d => console.log(`- ${d.slug}: ${d.title}`));
|
||||
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
run();
|
||||
Reference in New Issue
Block a user