This commit is contained in:
@@ -17,8 +17,8 @@ import (
|
||||
)
|
||||
|
||||
// DeleteAccountHandler 注销账号处理器
|
||||
// 根据当前token删除所有关联设备,然后根据各自设备ID重新新建账号
|
||||
// 新增:需携带邮箱验证码,验证通过后执行注销
|
||||
// 仅执行注销登录与家庭退出/解散,不删除账号主体。
|
||||
// 需携带邮箱验证码,验证通过后执行。
|
||||
type deleteAccountReq struct {
|
||||
Email string `json:"email" binding:"required,email"` // 用户邮箱
|
||||
Code string `json:"code" binding:"required"` // 邮箱验证码
|
||||
|
||||
@@ -8,6 +8,8 @@ import (
|
||||
)
|
||||
|
||||
// Delete Current User Account
|
||||
// Legacy destructive endpoint: this physically deletes account data.
|
||||
// Keep this behavior for backward compatibility.
|
||||
func DeleteCurrentUserAccountHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
||||
return func(c *gin.Context) {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
func UnbindDeviceHandler(svcCtx *svc.ServiceContext) func(c *gin.Context) {
|
||||
return func(c *gin.Context) {
|
||||
var req types.UnbindDeviceRequest
|
||||
_ = c.ShouldBind(&req)
|
||||
_ = c.ShouldBindJSON(&req)
|
||||
validateErr := svcCtx.Validate(&req)
|
||||
if validateErr != nil {
|
||||
result.ParamErrorResult(c, validateErr)
|
||||
|
||||
Reference in New Issue
Block a user