Function
createUser
(data: {
id: string;
username: string;
password: string;
role: Role;
})
Source from the content-addressed store, hash-verified
| 73 | } |
| 74 | |
| 75 | export async function createUser(data: { |
| 76 | id: string; |
| 77 | username: string; |
| 78 | password: string; |
| 79 | role: Role; |
| 80 | }) { |
| 81 | return prisma.client.user.create({ |
| 82 | data, |
| 83 | select: { |
| 84 | id: true, |
| 85 | username: true, |
| 86 | role: true, |
| 87 | }, |
| 88 | }); |
| 89 | } |
| 90 | |
| 91 | export async function updateUser(userId: string, data: Prisma.UserUpdateInput) { |
| 92 | return prisma.client.user.update({ |
Tested by
no test coverage detected