Gitea Auto Deploy / Deploy-Container (push) Failing after 13m19s
- Reformatted interfaces in changelog.ts, enka.ts, extraData.ts, global.d.ts, index.ts, lightconeDetail.ts, metaData.ts, mics.ts, mocDetail.ts, modelConfig.ts, monsterDetail.ts, peakDetail.ts, pfDetail.ts, psConnect.ts, relicDetail.ts, showcase.ts, srtools.ts, and zod/index.ts for consistent indentation and spacing. - Added missing imports and interfaces where necessary, such as Invasion in mocDetail.ts and peakDetail.ts. - Ensured all interfaces are properly structured and maintain a consistent style across the codebase.
25 lines
558 B
TypeScript
25 lines
558 B
TypeScript
import { getDataCache } from "@/lib/cache/cache"
|
|
|
|
export async function GET(
|
|
req: Request,
|
|
{ params }: { params: Promise<{ name: string }> }
|
|
) {
|
|
const { name } = await params
|
|
|
|
const item = getDataCache(name)
|
|
|
|
if (!item) {
|
|
return new Response("Not found", { status: 404 })
|
|
}
|
|
|
|
const headers: Record<string, string> = {
|
|
"Content-Type": "application/json",
|
|
"Cache-Control": "public, max-age=3600"
|
|
}
|
|
|
|
if (item.type === "br") {
|
|
headers["Content-Encoding"] = "br"
|
|
}
|
|
|
|
return new Response(new Uint8Array(item.buf), { headers })
|
|
} |