Fix app-store seeding (#3693)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>pull/3698/head^2
parent
ca7a78dcda
commit
2aee450c0b
|
@ -17,6 +17,18 @@ async function seedAppData() {
|
||||||
console.log(`Skipping Routing Form - Form Seed, "Seeded Form - Pro" already exists`);
|
console.log(`Skipping Routing Form - Form Seed, "Seeded Form - Pro" already exists`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const proUser = await prisma.user.findFirst({
|
||||||
|
where: {
|
||||||
|
username: "pro",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!proUser) {
|
||||||
|
console.log(`Skipping Routing Form - Seeding - Pro User not found`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
await prisma.app_RoutingForms_Form.create({
|
await prisma.app_RoutingForms_Form.create({
|
||||||
data: {
|
data: {
|
||||||
id: "948ae412-d995-4865-875a-48302588de03",
|
id: "948ae412-d995-4865-875a-48302588de03",
|
||||||
|
@ -242,3 +254,12 @@ export default async function main() {
|
||||||
|
|
||||||
await seedAppData();
|
await seedAppData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
main()
|
||||||
|
.catch((e) => {
|
||||||
|
console.error(e);
|
||||||
|
process.exit(1);
|
||||||
|
})
|
||||||
|
.finally(async () => {
|
||||||
|
await prisma.$disconnect();
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue