forked from XiaoMo/ChatGPT-Next-Web
Update app/requests.ts
fix: displaying the number of subscription beyond two decimal places.
This commit is contained in:
parent
e49acda806
commit
64e78329ec
@ -114,6 +114,10 @@ export async function requestUsage() {
|
||||
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,
|
||||
subscription: total.hard_limit_usd,
|
||||
|
Loading…
Reference in New Issue
Block a user