forked from creations/badgeAPI
add index route info, make it fetch per hour instead of every user, add health route, update to latest biome config aswell as logger
This commit is contained in:
parent
8cfa75ec57
commit
75d3dab85e
21 changed files with 943 additions and 364 deletions
17
types/health.d.ts
vendored
Normal file
17
types/health.d.ts
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
interface CacheInfo {
|
||||
timestamp: string | null;
|
||||
age: string;
|
||||
}
|
||||
|
||||
interface HealthResponse {
|
||||
status: "ok" | "degraded";
|
||||
timestamp: string;
|
||||
uptime: number;
|
||||
services: {
|
||||
redis: "ok" | "error" | "unknown";
|
||||
};
|
||||
cache: {
|
||||
lastFetched: Record<string, CacheInfo> | { error: string };
|
||||
nextUpdate: string | null;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue