MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / GetAllQuotaDates

Function GetAllQuotaDates

controller/usedata.go:12–27  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

10)
11
12func GetAllQuotaDates(c *gin.Context) {
13 startTimestamp, _ := strconv.ParseInt(c.Query("start_timestamp"), 10, 64)
14 endTimestamp, _ := strconv.ParseInt(c.Query("end_timestamp"), 10, 64)
15 username := c.Query("username")
16 dates, err := model.GetAllQuotaDates(startTimestamp, endTimestamp, username)
17 if err != nil {
18 common.ApiError(c, err)
19 return
20 }
21 c.JSON(http.StatusOK, gin.H{
22 "success": true,
23 "message": "",
24 "data": dates,
25 })
26 return
27}
28
29func GetUserQuotaDates(c *gin.Context) {
30 userId := c.GetInt("id")

Callers

nothing calls this directly

Calls 2

GetAllQuotaDatesFunction · 0.92
ApiErrorFunction · 0.92

Tested by

no test coverage detected