feat: 新增数据看板

This commit is contained in:
CaIon
2024-01-07 18:31:14 +08:00
parent c09df83f34
commit bf8794d257
16 changed files with 455 additions and 6 deletions

24
controller/usedata.go Normal file
View File

@@ -0,0 +1,24 @@
package controller
import (
"github.com/gin-gonic/gin"
"net/http"
"one-api/model"
)
func GetAllQuotaDates(c *gin.Context) {
dates, err := model.GetAllQuotaDates()
if err != nil {
c.JSON(http.StatusOK, gin.H{
"success": false,
"message": err.Error(),
})
return
}
c.JSON(http.StatusOK, gin.H{
"success": true,
"message": "",
"data": dates,
})
return
}