From 8f51cd826c374eb39e6dbecbda5f184ce38573e0 Mon Sep 17 00:00:00 2001 From: maru Date: Sun, 21 Apr 2024 18:57:27 -0400 Subject: [PATCH] Run formatter on code --- api/common.go | 2 +- api/endpoints.go | 2 +- pokerogue-server.go | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/api/common.go b/api/common.go index c93ab03..4412c35 100644 --- a/api/common.go +++ b/api/common.go @@ -24,7 +24,7 @@ func getTokenFromRequest(r *http.Request) ([]byte, error) { if err != nil { return nil, fmt.Errorf("failed to decode token: %s", err) } - + if len(token) != account.TokenSize { return nil, fmt.Errorf("invalid token length: got %d, expected %d", len(token), account.TokenSize) } diff --git a/api/endpoints.go b/api/endpoints.go index 7492f4d..f5f8aed 100644 --- a/api/endpoints.go +++ b/api/endpoints.go @@ -210,7 +210,7 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { } // TODO: make this not suck - if !active && r.URL.Path != "/savedata/clear"{ + if !active && r.URL.Path != "/savedata/clear" { httpError(w, r, fmt.Errorf("session out of date"), http.StatusBadRequest) return } diff --git a/pokerogue-server.go b/pokerogue-server.go index acd901c..3ac920f 100644 --- a/pokerogue-server.go +++ b/pokerogue-server.go @@ -30,7 +30,6 @@ func main() { flag.Parse() - // register gob types gob.Register([]interface{}{}) gob.Register(map[string]interface{}{})