调整交易和账单模型,完善支付与用户余额基础处理逻辑
This commit is contained in:
@@ -22,6 +22,7 @@ type LoginResp struct {
|
||||
RefreshToken string `json:"refresh_token"`
|
||||
Expires int64 `json:"expires"`
|
||||
Auth services.AuthContext `json:"auth"`
|
||||
Profile *models.User `json:"profile"`
|
||||
}
|
||||
|
||||
func Login(c *fiber.Ctx) error {
|
||||
@@ -105,10 +106,12 @@ func loginByPhone(c *fiber.Ctx, req *LoginReq) error {
|
||||
return err
|
||||
}
|
||||
|
||||
user.Password = ""
|
||||
return c.JSON(LoginResp{
|
||||
AccessToken: token.AccessToken,
|
||||
RefreshToken: token.RefreshToken,
|
||||
Expires: token.AccessTokenExpires.Unix(),
|
||||
Auth: auth,
|
||||
Profile: user,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user