From 871ab74576f9746da027b8765e562e746257a345 Mon Sep 17 00:00:00 2001 From: headlessdev Date: Tue, 15 Apr 2025 14:30:29 +0200 Subject: [PATCH] Update online status calculation to check if failure rate is below 50% --- app/api/applications/uptime/route.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/applications/uptime/route.ts b/app/api/applications/uptime/route.ts index af72649..e9dfc67 100644 --- a/app/api/applications/uptime/route.ts +++ b/app/api/applications/uptime/route.ts @@ -136,7 +136,7 @@ export async function POST(request: NextRequest) { return { timestamp: intervalKey, missing: !stats, - online: stats ? stats.failed < 3 : null + online: stats ? (stats.failed / stats.total) <= 0.5 : null }; });