add lazyload and move readme to func, add cache for readme and css

This commit is contained in:
creations 2025-04-26 10:47:12 -04:00
parent f6bda95f02
commit 10416dbff0
Signed by: creations
GPG key ID: 8F553AA4320FC711
5 changed files with 116 additions and 112 deletions

View file

@ -5,6 +5,7 @@ const routeDef: RouteDef = {
method: "GET",
accepts: "*/*",
returns: "application/json",
log: false,
};
async function fetchSteamGridIcon(gameName: string): Promise<string | null> {
@ -53,7 +54,10 @@ async function fetchSteamGridIcon(gameName: string): Promise<string | null> {
async function handler(request: ExtendedRequest): Promise<Response> {
if (!steamGridDbKey) {
return Response.json(
{ status: 503, error: "Route disabled due to missing SteamGridDB key" },
{
status: 503,
error: "Route disabled due to missing SteamGridDB key",
},
{ status: 503 },
);
}