This commit is contained in:
Timo Knuth
2026-04-29 23:45:21 +02:00
parent 6b6ce9d6ae
commit 2b14c778b7

View File

@@ -1,6 +1,6 @@
'use server' 'use server'
import { prisma } from '@innungsapp/shared' import { prisma, Prisma } from '@innungsapp/shared'
import { auth, getSanitizedHeaders } from '@/lib/auth' import { auth, getSanitizedHeaders } from '@/lib/auth'
import { revalidatePath } from 'next/cache' import { revalidatePath } from 'next/cache'
import { redirect } from 'next/navigation' import { redirect } from 'next/navigation'
@@ -13,13 +13,13 @@ function normalizeEmail(email: string | null | undefined): string {
return (email ?? '').trim().toLowerCase() return (email ?? '').trim().toLowerCase()
} }
function toJsonbText(value: string | undefined): string | null { function toJsonbText(value: string | undefined): typeof Prisma.DbNull | string {
if (!value) { if (!value) {
return null return Prisma.DbNull
} }
return value return value
} }
/** /**
* Sets a credential (email+password) account for a user. * Sets a credential (email+password) account for a user.