revert fb8e77bb68
Local Build and Deploy / deploy (push) Successful in 1m11s

revert style: clean up code with prettier and eslint
This commit is contained in:
remco committed 2026-07-12 21:02:03 +02:00
1 parent 27de078f54
commit e85e4d74ea
378 files changed
+20710 -22428

No files matched your search

+10 -10
View File
@@ -1,18 +1,18 @@
import { withAdmin } from "@/lib/api-handler";
import { PERMS } from "@/lib/permissions";
import { getPetIconPng } from "@/lib/services/pet-icon";
import { withAdmin } from '@/lib/api-handler'
import { PERMS } from '@/lib/permissions'
import { getPetIconPng } from '@/lib/services/pet-icon'
// Serves a cropped pet preview PNG extracted from the pet's .nitro spritesheet.
export const GET = withAdmin({ permission: PERMS.ASSETS_IMPORT }, async (request) => {
const lib = request.nextUrl.searchParams.get("lib") || "";
const png = getPetIconPng(lib);
if (!png) return new Response(null, { status: 404 });
const lib = request.nextUrl.searchParams.get('lib') || ''
const png = getPetIconPng(lib)
if (!png) return new Response(null, { status: 404 })
return new Response(new Uint8Array(png), {
headers: {
"Content-Type": "image/png",
'Content-Type': 'image/png',
// short cache so generator tweaks show up quickly; the in-process icon
// cache keeps regeneration cheap. Client bumps a ?v= when output changes.
"Cache-Control": "public, max-age=300",
'Cache-Control': 'public, max-age=300',
},
});
});
})
})