CancelController 注销账户 @Summary 注销账户 @Produce json @Param phone body string true "手机号" @Success 200 {object} resp.ResponseData "成功" @Failure 500 {object} resp.ResponseData "内部错误" @Router /api/public/login [post]
(ctx *gin.Context)
| 68 | // @Failure 500 {object} resp.ResponseData "内部错误" |
| 69 | // @Router /api/public/login [post] |
| 70 | func CancelController(ctx *gin.Context) { |
| 71 | userCancel := req.UserCancelReq{} |
| 72 | if err := ctx.ShouldBind(&userCancel); err != nil { |
| 73 | resp.ErrorResponse(ctx, "参数错误") |
| 74 | ctx.Abort() |
| 75 | return |
| 76 | } |
| 77 | response, err := service.CancelService(ctx, userCancel) |
| 78 | if err != nil { |
| 79 | ctx.Abort() |
| 80 | resp.ReturnErrorResponse(ctx, response) |
| 81 | return |
| 82 | } |
| 83 | resp.ReturnSuccessResponse(ctx, response) |
| 84 | } |
nothing calls this directly
no test coverage detected