From 7f66bb32623ffed6552ef27c11b09bc0e3b108d3 Mon Sep 17 00:00:00 2001 From: aichy126 <16996097+aichy126@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:14:20 +0800 Subject: [PATCH] fix user api ErrorResponse --- internal/controller/user_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/controller/user_controller.go b/internal/controller/user_controller.go index 4c346035..42a65792 100644 --- a/internal/controller/user_controller.go +++ b/internal/controller/user_controller.go @@ -323,7 +323,7 @@ func (uc *UserController) UserModifyPassWord(ctx *gin.Context) { } if !oldPassVerification { resp := schema.UserVerifyEmailErrorResponse{ - Key: "captcha_code", + Key: "old_pass", Value: "error.object.old_password_verification_failed", } resp.Value = translator.GlobalTrans.Tr(handler.GetLang(ctx), resp.Value) @@ -333,7 +333,7 @@ func (uc *UserController) UserModifyPassWord(ctx *gin.Context) { if req.OldPass == req.Pass { resp := schema.UserVerifyEmailErrorResponse{ - Key: "captcha_code", + Key: "pass", Value: "error.object.new_password_same_as_previous_setting", } resp.Value = translator.GlobalTrans.Tr(handler.GetLang(ctx), resp.Value)