Files
Firefly_Srtools/src/app/api/[locale]/relics/[id]/route.ts
AzenKain 487c29def1
Some checks failed
Gitea Auto Deploy / Deploy-Container (push) Failing after 1m36s
UPDATE: monster bar
2025-07-25 09:20:39 +07:00

19 lines
464 B
TypeScript

import { NextRequest, NextResponse } from 'next/server'
import { loadRelics } from '@/lib/loader'
export async function GET(
req: NextRequest,
{ params }: { params: Promise<{ id: string, locale: string }> }
) {
const { id, locale } = await params
const relics = await loadRelics([id], locale)
const relic = relics[id]
if (!relic) {
return NextResponse.json({ error: 'Relic not found' }, { status: 404 })
}
return NextResponse.json(relic)
}