Migrate config to PostgreSQL

This commit is contained in:
mstfyldz
2026-05-27 16:53:06 +03:00
parent 10f7ee95dd
commit a5951a97e9
6 changed files with 117 additions and 48 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ export async function GET(req: NextRequest) {
if (!dbId) return NextResponse.json({ error: 'dbId gerekli' }, { status: 400 })
const config = readConfig()
const config = await readConfig()
const db = config.databases.find(d => d.id === dbId)
if (!db) return NextResponse.json({ error: 'DB bulunamadı' }, { status: 404 })
@@ -37,7 +37,7 @@ export async function POST(req: NextRequest) {
}
const { dbId, sql } = body
const config = readConfig()
const config = await readConfig()
const db = config.databases.find(d => d.id === dbId)
if (!db) return NextResponse.json({ error: 'DB bulunamadı' }, { status: 404 })