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:
parent
7f1211a048
commit
dad44ca384
@ -1,6 +1,6 @@
|
||||
{
|
||||
"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",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -9,7 +9,7 @@ export async function GET(request: NextRequest) {
|
||||
const session = await getServerSession(authOptions);
|
||||
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 },
|
||||
select: {
|
||||
name: true,
|
||||
@ -192,7 +192,7 @@ export async function PATCH(request: NextRequest) {
|
||||
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 },
|
||||
data: updateData,
|
||||
select: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user