(c *gin.Context)
| 160 | } |
| 161 | |
| 162 | func DeleteToken(c *gin.Context) { |
| 163 | id, _ := strconv.Atoi(c.Param("id")) |
| 164 | userId := c.GetInt("id") |
| 165 | err := model.DeleteTokenById(id, userId) |
| 166 | if err != nil { |
| 167 | common.ApiError(c, err) |
| 168 | return |
| 169 | } |
| 170 | c.JSON(http.StatusOK, gin.H{ |
| 171 | "success": true, |
| 172 | "message": "", |
| 173 | }) |
| 174 | return |
| 175 | } |
| 176 | |
| 177 | func UpdateToken(c *gin.Context) { |
| 178 | userId := c.GetInt("id") |
nothing calls this directly
no test coverage detected