feat: add email in userinfo
This commit is contained in:
@@ -100,15 +100,9 @@ func (h *UserEndpoint) GetUserInfo(ctx *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
status := 0
|
|
||||||
if user.ID > 0 {
|
|
||||||
status = 1
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.JSON(http.StatusOK, common.SuccessResponse(ctx, model.UserInfoResponse{
|
ctx.JSON(http.StatusOK, common.SuccessResponse(ctx, model.UserInfoResponse{
|
||||||
Username: user.Username,
|
Username: user.Username,
|
||||||
Phone: user.Phone,
|
Email: user.Email,
|
||||||
Status: status,
|
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,7 @@ type PhoneLoginResponse struct {
|
|||||||
|
|
||||||
type UserInfoResponse struct {
|
type UserInfoResponse struct {
|
||||||
Username string `json:"username"`
|
Username string `json:"username"`
|
||||||
Phone string `json:"phone"`
|
Email string `json:"email"`
|
||||||
Status int `json:"status"` // 0: not login, 1: login
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type EmailRegisterRequest struct {
|
type EmailRegisterRequest struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user