Skip to content

Commit

Permalink
unstable: handlers: login: fixed invalid returning token
Browse files Browse the repository at this point in the history
  • Loading branch information
pandadiestro committed Nov 26, 2024
1 parent 7d1e23e commit 4feb7ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stiller-backend/internal/handlers/post_auth.login.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func PostAuthLogin(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
}

type ResPayload struct {
Token []byte `json:"token"`
Token string `json:"token"`
UserData dbutils.StillerUser `json:"userdata"`
}

Expand Down Expand Up @@ -64,7 +64,7 @@ func PostAuthLogin(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

res_payload.UserData = user_data
res_payload.UserData.Bpasswd = ""
res_payload.Token = sign_encoded
res_payload.Token = string(sign_encoded)
jsonexp.MarshalWrite(w, res_payload, jsonexp.DefaultOptionsV2())
}

0 comments on commit 4feb7ff

Please sign in to comment.