({
username,
password,
}: {
username: User['username']
password: string
})
| 90 | } |
| 91 | |
| 92 | export async function resetUserPassword({ |
| 93 | username, |
| 94 | password, |
| 95 | }: { |
| 96 | username: User['username'] |
| 97 | password: string |
| 98 | }) { |
| 99 | const hashedPassword = await getPasswordHash(password) |
| 100 | return prisma.user.update({ |
| 101 | where: { username }, |
| 102 | data: { |
| 103 | password: { |
| 104 | update: { |
| 105 | hash: hashedPassword, |
| 106 | }, |
| 107 | }, |
| 108 | }, |
| 109 | }) |
| 110 | } |
| 111 | |
| 112 | export async function signup({ |
| 113 | email, |
no test coverage detected