fix(api): use type assertions for User model to bypass prisma type-lag during build

chore(release): bump version to 1.8.5
This commit is contained in:
mARTin 2026-03-01 15:35:18 +01:00
parent 7f1211a048
commit dad44ca384
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "my-weekly-todo-list", "name": "my-weekly-todo-list",
"version": "1.8.4", "version": "1.8.5",
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -9,7 +9,7 @@ export async function GET(request: NextRequest) {
const session = await getServerSession(authOptions); const session = await getServerSession(authOptions);
if (!session?.user?.email) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 }); if (!session?.user?.email) return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
const user = await prisma.user.findUnique({ const user = await (prisma.user as any).findUnique({
where: { email: session.user.email }, where: { email: session.user.email },
select: { select: {
name: true, name: true,
@ -192,7 +192,7 @@ export async function PATCH(request: NextRequest) {
updateData.passwordHash = await bcrypt.hash(password, 10); updateData.passwordHash = await bcrypt.hash(password, 10);
} }
const user = await prisma.user.update({ const user = await (prisma.user as any).update({
where: { email: session.user.email }, where: { email: session.user.email },
data: updateData, data: updateData,
select: { select: {