Migrate config to PostgreSQL
This commit is contained in:
@@ -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 })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user