Skip to content

Commit

Permalink
full iso date
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC committed Jan 25, 2025
1 parent 4f79c1e commit 1502712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/track/apiKeyUsages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function getApiKeyUsages(key_id: number, dates?: Array<string>, 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<string>): Promise<number> {
Expand Down

0 comments on commit 1502712

Please sign in to comment.