Skip to content

Commit

Permalink
Merge pull request #7 from blinko-space/main
Browse files Browse the repository at this point in the history
🐞fix: build error
  • Loading branch information
blinko-space authored Oct 26, 2024
2 parents 40c431b + 9f92182 commit 1db57bc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,22 @@ const prisma = new PrismaClient();
async function main() {
const hasNotes = await prisma.notes.findMany();
if (hasNotes.length == 0) {
await prisma.notes.createMany({ data: notes })
const noteRes = await prisma.notes.createManyAndReturn({ data: notes })
await prisma.tag.createMany({ data: tag })
await prisma.tagsToNote.createMany({ data: tagsToNote })
await prisma.attachments.createMany({ data: attachments })
return noteRes
}
}

main()
.then(e => {
console.log(e)
console.log("✨ Seed done! ✨")
})
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
process.exit(1);
});

0 comments on commit 1db57bc

Please sign in to comment.