(c *gin.Context)
| 156 | } |
| 157 | |
| 158 | func 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 | |
| 172 | func resetUserPassword(c *gin.Context) { |
| 173 | response := gin.H{"code": http.StatusOK} |
nothing calls this directly
no test coverage detected