(c *gin.Context)
| 42 | } |
| 43 | |
| 44 | func GetToken(c *gin.Context) { |
| 45 | id, err := strconv.Atoi(c.Param("id")) |
| 46 | userId := c.GetInt("id") |
| 47 | if err != nil { |
| 48 | common.ApiError(c, err) |
| 49 | return |
| 50 | } |
| 51 | token, err := model.GetTokenByIds(id, userId) |
| 52 | if err != nil { |
| 53 | common.ApiError(c, err) |
| 54 | return |
| 55 | } |
| 56 | c.JSON(http.StatusOK, gin.H{ |
| 57 | "success": true, |
| 58 | "message": "", |
| 59 | "data": token, |
| 60 | }) |
| 61 | return |
| 62 | } |
| 63 | |
| 64 | func GetTokenStatus(c *gin.Context) { |
| 65 | tokenId := c.GetInt("token_id") |
nothing calls this directly
no test coverage detected