MCPcopy Create free account
hub / github.com/TalkingData/owl / deleteUser

Function deleteUser

api/users.go:158–170  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

156}
157
158func deleteUser(c *gin.Context) {
159 response := gin.H{"code": http.StatusOK}
160 defer c.JSON(http.StatusOK, response)
161 userID, err := strconv.Atoi(c.Param("user_id"))
162 if err != nil {
163 response["code"] = http.StatusBadRequest
164 return
165 }
166 if err := mydb.deleteUser(userID); err != nil {
167 response["code"] = http.StatusInternalServerError
168 return
169 }
170}
171
172func resetUserPassword(c *gin.Context) {
173 response := gin.H{"code": http.StatusOK}

Callers

nothing calls this directly

Calls 1

deleteUserMethod · 0.80

Tested by

no test coverage detected