From bae5277d1afea4eaa8446b104baffbfb435eaeca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20Kadir=20Ak=C4=B1n?= Date: Tue, 27 Jan 2026 13:53:39 +0300 Subject: [PATCH] feat(api, ui): add Prisma client import and type definition for custom links --- src/app/api/user/profile/route.ts | 3 ++- src/app/settings/page.tsx | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/api/user/profile/route.ts b/src/app/api/user/profile/route.ts index b080cd8f..3390dc50 100644 --- a/src/app/api/user/profile/route.ts +++ b/src/app/api/user/profile/route.ts @@ -1,5 +1,6 @@ import { NextRequest, NextResponse } from "next/server"; import { z } from "zod"; +import { Prisma } from "@prisma/client"; import { auth } from "@/lib/auth"; import { db } from "@/lib/db"; @@ -66,7 +67,7 @@ export async function PATCH(request: NextRequest) { username, avatar: avatar || null, bio: bio || null, - customLinks: customLinks && customLinks.length > 0 ? customLinks : null, + customLinks: customLinks && customLinks.length > 0 ? customLinks : Prisma.DbNull, }, select: { id: true, diff --git a/src/app/settings/page.tsx b/src/app/settings/page.tsx index 1adc8da9..e9fff5cb 100644 --- a/src/app/settings/page.tsx +++ b/src/app/settings/page.tsx @@ -5,6 +5,7 @@ import { db } from "@/lib/db"; import config from "@/../prompts.config"; import { ProfileForm } from "@/components/settings/profile-form"; import { ApiKeySettings } from "@/components/settings/api-key-settings"; +import type { CustomLink } from "@/components/user/profile-links"; export default async function SettingsPage() { const session = await auth(); @@ -44,7 +45,13 @@ export default async function SettingsPage() {
- + {config.features.mcp !== false && (