MCPcopy Create free account
hub / github.com/code100x/cms / seedUsers

Function seedUsers

prisma/seed.ts:3–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import db from '../src/db';
2
3async function seedUsers() {
4 try {
5 await db.user.upsert({
6 where: {
7 id: '1',
8 },
9 create: {
10 id: '1',
11 email: 'testuser@example.com',
12 name: 'Test User 1',
13 disableDrm: false,
14 },
15 update: {},
16 });
17
18 await db.user.upsert({
19 where: {
20 id: '2',
21 },
22 create: {
23 id: '2',
24 email: 'testuser2@example.com',
25 name: 'Test User 2',
26 disableDrm: false,
27 },
28 update: {},
29 });
30 } catch (error) {
31 console.error('Error seeding users:', error);
32 throw error;
33 }
34}
35
36async function seedCourses() {
37 const courses = [

Callers 1

seedDatabaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected