Initial commit: Lageplan v1.0 - Next.js 15.5, React 19
This commit is contained in:
17
src/app/api/settings/public/route.ts
Normal file
17
src/app/api/settings/public/route.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { NextResponse } from 'next/server'
|
||||
import { prisma } from '@/lib/db'
|
||||
|
||||
// GET: Public app settings (no auth required, non-sensitive values only)
|
||||
export async function GET() {
|
||||
try {
|
||||
let defaultSymbolScale = 1.5
|
||||
try {
|
||||
const setting = await (prisma as any).systemSetting.findUnique({ where: { key: 'default_symbol_scale' } })
|
||||
if (setting) defaultSymbolScale = parseFloat(setting.value) || 1.5
|
||||
} catch {}
|
||||
|
||||
return NextResponse.json({ defaultSymbolScale })
|
||||
} catch {
|
||||
return NextResponse.json({ defaultSymbolScale: 1.5 })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user