From 150271279836f59f7520aacabefb77610953638c Mon Sep 17 00:00:00 2001 From: Donovan Daniels Date: Sat, 25 Jan 2025 14:14:27 -0600 Subject: [PATCH] full iso date --- src/track/apiKeyUsages.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/track/apiKeyUsages.ts b/src/track/apiKeyUsages.ts index 726e130..462b112 100644 --- a/src/track/apiKeyUsages.ts +++ b/src/track/apiKeyUsages.ts @@ -21,7 +21,7 @@ async function getApiKeyUsages(key_id: number, dates?: Array, limit = 10 format: "JSON" }); - return (await r.json<{ action: string; controller: string; date: string; ip_address: string; method: string; request_uri: string; }>()).data.map(v => ({ action: v.action, controller: v.controller, date: v.date, ip_address: unconvertIPAddress(v.ip_address), method: v.method, request_uri: v.request_uri })); + return (await r.json<{ action: string; controller: string; date: string; ip_address: string; method: string; request_uri: string; }>()).data.map(v => ({ action: v.action, controller: v.controller, date: new Date(v.date).toISOString(), ip_address: unconvertIPAddress(v.ip_address), method: v.method, request_uri: v.request_uri })); } async function countApiKeyUsages(key_id: number, dates?: Array): Promise {