aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 21:53:31 -0400
committerpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 21:53:31 -0400
commitcb65bc2c3939b8d08c40bbe62f87e0fccdb9984d (patch)
tree90d6285578fa258e3089298b133f47531745eb69 /pkg
parente0ac2504175e62179500c202e97aa98bba9769ca (diff)
downloadAtlas-cb65bc2c3939b8d08c40bbe62f87e0fccdb9984d.tar.gz
Atlas-cb65bc2c3939b8d08c40bbe62f87e0fccdb9984d.zip
pkg/api/api0: Explicitly route /player endpoints
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/api0/api.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/pkg/api/api0/api.go b/pkg/api/api0/api.go
index 398ac17..10729e1 100644
--- a/pkg/api/api0/api.go
+++ b/pkg/api/api0/api.go
@@ -104,12 +104,9 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
h.handleAccountsGetUsername(w, r)
case "/accounts/lookup_uid":
h.handleAccountsLookupUID(w, r)
+ case "/player/pdata", "/player/info", "/player/stats", "/player/loadout":
+ h.handlePlayer(w, r)
default:
- if strings.HasPrefix(r.URL.Path, "/player/") {
- // TODO: rate limit
- h.handlePlayer(w, r)
- return
- }
if h.NotFound == nil {
http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
} else {