feat: add user balance
This commit is contained in:
@@ -18,6 +18,7 @@ type UserInfo struct {
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
Username string `json:"username,omitempty"`
|
||||
Avatar string `json:"avatar,omitempty"`
|
||||
Balance int64 `json:"balance,omitempty"`
|
||||
}
|
||||
|
||||
// @Router /users/profile [get]
|
||||
@@ -28,6 +29,7 @@ func (ctl *users) Profile(ctx fiber.Ctx, user *model.Users) (*UserInfo, error) {
|
||||
CreatedAt: user.CreatedAt,
|
||||
Username: user.Username,
|
||||
Avatar: *user.Avatar,
|
||||
Balance: user.Balance,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user