throw if user not found

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-06-16 21:24:44 +02:00
parent 7d35f7e65c
commit 1fc64ef1f9
2 changed files with 6 additions and 2 deletions

View File

@@ -11,7 +11,7 @@ export async function getCurrentUser() {
}
export async function getUserById(id: string) {
return db.user.findUnique({
return db.user.findUniqueOrThrow({
where: {
id,
},