fix: 密码重置链路断裂与店铺模板类型不兼容
删除 users-api 的 forgot-password 空壳路由,email-api 的
forgotPasswordLogic 复用 sendVerificationCode 实现。shop 的
UpdateTemplateReq.Sections 从 interface{} 改为 string 以兼容
go-zero 反序列化。ResetPasswordReq.Phone 加 optional tag。
This commit is contained in:
+2
-2
@@ -38,8 +38,8 @@ type (
|
||||
DispatchMode string `json:"dispatchMode,optional"`
|
||||
}
|
||||
UpdateTemplateReq {
|
||||
Id int64 `path:"id"`
|
||||
Sections interface{} `json:"sections"`
|
||||
Id int64 `path:"id"`
|
||||
Sections string `json:"sections"`
|
||||
}
|
||||
AnnouncementReq {
|
||||
Id int64 `path:"id"`
|
||||
|
||||
+3
-11
@@ -10,8 +10,8 @@ info (
|
||||
type (
|
||||
// 认证材料结构体(示例,实际根据需求定义)
|
||||
MaterialJson {
|
||||
IdCardFront string `json:"idCardFront"` // 身份证正面照片URL
|
||||
IdCardBack string `json:"idCardBack"` // 身份证反面照片URL
|
||||
IdCardFront string `json:"idCardFront"` // 身份证正面照片URL
|
||||
IdCardBack string `json:"idCardBack"` // 身份证反面照片URL
|
||||
GameScreenshots []*string `json:"gameScreenshots,optional"` // 游戏截图URL列表
|
||||
VoiceDemo *string `json:"voiceDemo,optional"` // 语音认证示例URL
|
||||
}
|
||||
@@ -107,12 +107,8 @@ type (
|
||||
User User `json:"user"`
|
||||
}
|
||||
LogoutReq {}
|
||||
ForgotPasswordReq {
|
||||
Phone string `json:"phone,omitempty"`
|
||||
Email string `json:"email,omitempty"`
|
||||
}
|
||||
ResetPasswordReq {
|
||||
Phone string `json:"phone,omitempty"`
|
||||
Phone string `json:"phone,optional"`
|
||||
Email string `json:"email,omitempty"`
|
||||
Vcode string `json:"vcode"`
|
||||
NewPassword string `json:"newPassword"`
|
||||
@@ -172,10 +168,6 @@ service user-api {
|
||||
@handler Login
|
||||
post /login (LoginReq) returns (LoginResp)
|
||||
|
||||
@doc "忘记密码-发送验证码"
|
||||
@handler ForgotPassword
|
||||
post /forgot-password (ForgotPasswordReq) returns (EmptyResp)
|
||||
|
||||
@doc "重置密码"
|
||||
@handler ResetPassword
|
||||
post /reset-password (ResetPasswordReq) returns (EmptyResp)
|
||||
|
||||
Reference in New Issue
Block a user