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

Function DeleteToken

controller/token.go:162–175  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

160}
161
162func 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
177func UpdateToken(c *gin.Context) {
178 userId := c.GetInt("id")

Callers

nothing calls this directly

Calls 2

DeleteTokenByIdFunction · 0.92
ApiErrorFunction · 0.92

Tested by

no test coverage detected