mirror of
				https://github.com/DerTyp7/f1r3wave-website.git
				synced 2025-10-30 21:47:09 +01:00 
			
		
		
		
	Clean up code
This commit is contained in:
		| @@ -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)); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user