Skip to content

Commit

Permalink
Update app/requests.ts
Browse files Browse the repository at this point in the history
fix: displaying the number of subscription beyond two decimal places.
  • Loading branch information
ClarenceYk committed Apr 17, 2023
1 parent e49acda commit 64e7832
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ export async function requestUsage() {
if (response.total_usage) {
response.total_usage = Math.round(response.total_usage) / 100;
}

if (total.hard_limit_usd) {
total.hard_limit_usd = Math.round(total.hard_limit_usd * 100) / 100;
}

return {
used: response.total_usage,
Expand Down

0 comments on commit 64e7832

Please sign in to comment.