From fd186a1c3ba47abbf081aab97bb80256393eabef Mon Sep 17 00:00:00 2001 From: DerTyp7 Date: Thu, 9 Oct 2025 18:46:14 +0200 Subject: [PATCH] Clean up code --- src/app/api/config/route.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/api/config/route.ts b/src/app/api/config/route.ts index 4331923..488831e 100644 --- a/src/app/api/config/route.ts +++ b/src/app/api/config/route.ts @@ -1,12 +1,11 @@ import { configPath, configTemplate } from '@/const/api'; import fs from 'fs/promises'; -import { NextRequest, NextResponse } from 'next/server'; +import { NextResponse } from 'next/server'; -export async function GET(request: NextRequest) { +export async function GET() { try { const fileBuffer = await fs.readFile(configPath, 'utf8'); const config = JSON.parse(fileBuffer); - console.log(config); return NextResponse.json(config, { status: 200 }); } catch { await fs.writeFile(configPath, JSON.stringify(configTemplate, null, 2));