mirror of
https://github.com/gabehf/BudgetBuddy.git
synced 2026-03-15 02:06:01 -07:00
fix auth responses
This commit is contained in:
parent
131e34ca84
commit
7524edbce4
3 changed files with 9 additions and 4 deletions
|
|
@ -12,8 +12,9 @@ import (
|
|||
)
|
||||
|
||||
type UserInfoResponse struct {
|
||||
Name string `json:"name" bson:"name"`
|
||||
Email string `json:"email" bson:"email"`
|
||||
Status int `json:"status"`
|
||||
Name string `json:"name" bson:"name"`
|
||||
Email string `json:"email" bson:"email"`
|
||||
}
|
||||
|
||||
func UserInfo(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
@ -40,8 +41,9 @@ func UserInfo(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
info := UserInfoResponse{
|
||||
Name: user.Name,
|
||||
Email: user.Email,
|
||||
Status: 200,
|
||||
Name: user.Name,
|
||||
Email: user.Email,
|
||||
}
|
||||
|
||||
ret, err := json.Marshal(info)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue