UserChangeEmailVerify user change email verification @Summary user change email verification @Description user change email verification @Tags User @Accept json @Produce json @Security ApiKeyAuth @Param data body schema.UserChangeEmailVerifyReq true "UserChangeEmailVerifyReq" @Success 200 {object} h
(ctx *gin.Context)
| 617 | // @Success 200 {object} handler.RespBody{} |
| 618 | // @Router /answer/api/v1/user/email [put] |
| 619 | func (uc *UserController) UserChangeEmailVerify(ctx *gin.Context) { |
| 620 | req := &schema.UserChangeEmailVerifyReq{} |
| 621 | if handler.BindAndCheck(ctx, req) { |
| 622 | return |
| 623 | } |
| 624 | req.Content = uc.emailService.VerifyUrlExpired(ctx, req.Code) |
| 625 | if len(req.Content) == 0 { |
| 626 | handler.HandleResponse(ctx, errors.Forbidden(reason.EmailVerifyURLExpired), |
| 627 | &schema.ForbiddenResp{Type: schema.ForbiddenReasonTypeURLExpired}) |
| 628 | return |
| 629 | } |
| 630 | |
| 631 | resp, err := uc.userService.UserChangeEmailVerify(ctx, req.Content) |
| 632 | uc.actionService.ActionRecordDel(ctx, entity.CaptchaActionEmail, ctx.ClientIP()) |
| 633 | handler.HandleResponse(ctx, err, resp) |
| 634 | } |
| 635 | |
| 636 | // UserRanking get user ranking |
| 637 | // @Summary get user ranking |
nothing calls this directly
no test coverage detected