refactor: remove IsCameo flag from JSON

This commit is contained in:
Settel 2024-02-18 10:34:13 +01:00
parent a06e50b704
commit 0f0b2ede64
2 changed files with 2 additions and 1 deletions

View File

@ -33,6 +33,7 @@ func (authMux *AuthMux) Login(w http.ResponseWriter, r *http.Request) {
} }
if !usr.IsAdmin() { if !usr.IsAdmin() {
// check, if game is enabled
gm, err := authMux.app.GetGameById(usr.GetGameId()) gm, err := authMux.app.GetGameById(usr.GetGameId())
if err != nil || !gm.IsActive() { if err != nil || !gm.IsActive() {
log.ErrorLog(fmt.Errorf("game %s disabled for user %s", gm.GetId(), usr.GetName())) log.ErrorLog(fmt.Errorf("game %s disabled for user %s", gm.GetId(), usr.GetName()))

View File

@ -37,5 +37,5 @@ type UserinfoJson struct {
Name string `json:"name"` Name string `json:"name"`
Role string `json:"role"` Role string `json:"role"`
GameId string `json:"game"` GameId string `json:"game"`
IsCameo bool `json:"isCameo,omitempty"` IsCameo bool `json:"-"`
} }