Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit 3f57991

Browse files
committed
fix(axiom): seed script failing due to emails not matching data model
1 parent 6a1f8ae commit 3f57991

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

libs/db/collections/models/Emails.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -93,33 +93,33 @@ export const Emails: CollectionConfig = {
9393
}
9494

9595

96-
export async function seedEmails(payload: Payload) {
97-
try {
98-
await Promise.all(
99-
emailSeedData.map(async (email) => {
100-
await payload.create({
101-
collection: 'emails',
102-
data: {
103-
title: email.title,
104-
body: {
105-
text: email.body.text,
106-
buttonText: email.body.buttonText,
107-
buttonLink: email.body.buttonLink,
108-
secondButtonText: email.body.secondButtonText || null,
109-
secondButtonLink: email.body.secondButtonLink || null,
110-
events: email.body.events || [],
111-
footer: email.body.footer,
112-
},
113-
},
114-
})
115-
}),
116-
)
117-
console.log('Email seed data successfully inserted!')
118-
}
119-
catch (error) {
120-
console.error('Error seeding email data:', error)
121-
}
122-
}
96+
// export async function seedEmails(payload: Payload) {
97+
// try {
98+
// await Promise.all(
99+
// emailSeedData.map(async (email) => {
100+
// await payload.create({
101+
// collection: 'emails',
102+
// data: {
103+
// title: email.title,
104+
// body: {
105+
// text: email.body.text,
106+
// buttonText: email.body.buttonText,
107+
// buttonLink: email.body.buttonLink,
108+
// secondButtonText: email.body.secondButtonText || null,
109+
// secondButtonLink: email.body.secondButtonLink || null,
110+
// events: email.body.events || [],
111+
// footer: email.body.footer,
112+
// },
113+
// },
114+
// })
115+
// }),
116+
// )
117+
// console.log('Email seed data successfully inserted!')
118+
// }
119+
// catch (error) {
120+
// console.error('Error seeding email data:', error)
121+
// }
122+
// }
123123

124124

125125
// WIP - NOT FINISHED YET

libs/db/seed/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
import type { CollectionSlug, File, Payload, PayloadRequest } from "payload";
33
import { seedHardware } from "@/db/collections";
44
import { seedBrands } from "@/db/collections/Brands";
5-
import { seedEmails, seedHackathons } from "@/db/collections/models";
5+
import {
6+
// seedEmails,
7+
seedHackathons } from "@/db/collections/models";
68
import { seedMedia } from "@/db/collections/models";
79
import { seedUsers } from "@/db/collections/models/Users";
810
import { seedGroups } from "@/db/collections/models";
@@ -65,7 +67,7 @@ export async function seed({
6567

6668
try {
6769
await seedMedia(payload);
68-
await seedEmails(payload);
70+
// await seedEmails(payload);
6971
await seedHardware(payload);
7072
await seedHackathons(payload);
7173
await seedGroups(payload);

0 commit comments

Comments
 (0)