diff options
author | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-15 10:17:41 -0400 |
---|---|---|
committer | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-15 10:17:41 -0400 |
commit | 27965129dce1825f2272aed60f14bcdd1ce096d5 (patch) | |
tree | f61d2895706b6a2e3a4c7873cbcdbc24c3ee6bfb /pkg/api/api0 | |
parent | de7b402f6ac3fedfe6ff13458dbabdb44e8c25ce (diff) | |
download | Atlas-27965129dce1825f2272aed60f14bcdd1ce096d5.tar.gz Atlas-27965129dce1825f2272aed60f14bcdd1ce096d5.zip |
pkg/api/api0: Fix playerCount and maxPlayers server value updates
I seem to have been a little short on sleep...
Diffstat (limited to 'pkg/api/api0')
-rw-r--r-- | pkg/api/api0/server.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/api/api0/server.go b/pkg/api/api0/server.go index 3c748a2..bb25790 100644 --- a/pkg/api/api0/server.go +++ b/pkg/api/api0/server.go @@ -245,10 +245,11 @@ func (h *Handler) handleServerUpsert(w http.ResponseWriter, r *http.Request) { if n, err := strconv.ParseUint(r.URL.Query().Get("playerCount"), 10, 8); err == nil { if canCreate { - s.MaxPlayers = int(n) + s.PlayerCount = int(n) } if canUpdate { - s.MaxPlayers = int(n) + x := int(n) + u.PlayerCount = &x } } @@ -257,7 +258,8 @@ func (h *Handler) handleServerUpsert(w http.ResponseWriter, r *http.Request) { s.MaxPlayers = int(n) } if canUpdate { - s.MaxPlayers = int(n) + x := int(n) + u.MaxPlayers = &x } } } |