fix: billing date json issue
This commit is contained in:
parent
b63400ebe2
commit
0ac0214c41
@ -3,7 +3,6 @@ package controller
|
|||||||
import (
|
import (
|
||||||
"one-api/common"
|
"one-api/common"
|
||||||
"one-api/model"
|
"one-api/model"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
@ -47,7 +46,7 @@ func GetSubscription(c *gin.Context) {
|
|||||||
SoftLimitUSD: amount,
|
SoftLimitUSD: amount,
|
||||||
HardLimitUSD: amount,
|
HardLimitUSD: amount,
|
||||||
SystemHardLimitUSD: amount,
|
SystemHardLimitUSD: amount,
|
||||||
AccessUntil: time.Unix(expirationDate, 0),
|
AccessUntil: expirationDate,
|
||||||
}
|
}
|
||||||
c.JSON(200, subscription)
|
c.JSON(200, subscription)
|
||||||
return
|
return
|
||||||
|
@ -17,12 +17,12 @@ import (
|
|||||||
// https://github.com/songquanpeng/one-api/issues/79
|
// https://github.com/songquanpeng/one-api/issues/79
|
||||||
|
|
||||||
type OpenAISubscriptionResponse struct {
|
type OpenAISubscriptionResponse struct {
|
||||||
Object string `json:"object"`
|
Object string `json:"object"`
|
||||||
HasPaymentMethod bool `json:"has_payment_method"`
|
HasPaymentMethod bool `json:"has_payment_method"`
|
||||||
SoftLimitUSD float64 `json:"soft_limit_usd"`
|
SoftLimitUSD float64 `json:"soft_limit_usd"`
|
||||||
HardLimitUSD float64 `json:"hard_limit_usd"`
|
HardLimitUSD float64 `json:"hard_limit_usd"`
|
||||||
SystemHardLimitUSD float64 `json:"system_hard_limit_usd"`
|
SystemHardLimitUSD float64 `json:"system_hard_limit_usd"`
|
||||||
AccessUntil time.Time `json:"access_until"`
|
AccessUntil int64 `json:"access_until"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type OpenAIUsageDailyCost struct {
|
type OpenAIUsageDailyCost struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user