bugfix: fix compiler warning
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
cfe0a679c2
commit
786a1c46f1
@ -4,6 +4,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"sirlab.de/go/knowyt/user"
|
"sirlab.de/go/knowyt/user"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -13,7 +14,7 @@ type UserInfoJson struct {
|
|||||||
Lang string `json:"lang"`
|
Lang string `json:"lang"`
|
||||||
Role string `json:"role"`
|
Role string `json:"role"`
|
||||||
GameId string `json:"game"`
|
GameId string `json:"game"`
|
||||||
IsCameo string `json:"isCameo",omitempty`
|
IsCameo string `json:"isCameo,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (authMux *AuthMux) GetUserInfo(usr *user.User, w http.ResponseWriter, r *http.Request) {
|
func (authMux *AuthMux) GetUserInfo(usr *user.User, w http.ResponseWriter, r *http.Request) {
|
||||||
@ -35,5 +36,5 @@ func (authMux *AuthMux) GetUserInfo(usr *user.User, w http.ResponseWriter, r *ht
|
|||||||
|
|
||||||
w.Header().Add("Content-Type", "application/json")
|
w.Header().Add("Content-Type", "application/json")
|
||||||
jsonString, _ := json.Marshal(usrLight)
|
jsonString, _ := json.Marshal(usrLight)
|
||||||
fmt.Fprintf(w, string(jsonString))
|
fmt.Fprintf(w, "%s", string(jsonString))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user