(c *gin.Context)
| 10 | ) |
| 11 | |
| 12 | func 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 | |
| 29 | func GetUserQuotaDates(c *gin.Context) { |
| 30 | userId := c.GetInt("id") |
nothing calls this directly
no test coverage detected