diff --git a/src/app/api/get-theme/[id]/route.ts b/src/app/api/get-theme/[id]/route.ts index 0a5d99c..78c7a69 100644 --- a/src/app/api/get-theme/[id]/route.ts +++ b/src/app/api/get-theme/[id]/route.ts @@ -10,9 +10,16 @@ export async function generateStaticParams() { })); } + +function removeUneccessaryKeys(theme: any) { + delete theme["isDarkMode"]; + delete theme["isColorTheme"]; + return theme; +} + export async function GET(request: any, { params }: { params: { id: string } }) { const themes = await getAllThemes(); const theme = themes.find((theme) => theme.id === params.id); console.log(theme); - return NextResponse.json(theme); + return NextResponse.json(removeUneccessaryKeys(theme)); } \ No newline at end of file