From 4999ad031c0d96635c0669d4827188fdf64192f8 Mon Sep 17 00:00:00 2001 From: pg9182 <96569817+pg9182@users.noreply.github.com> Date: Thu, 13 Oct 2022 02:41:03 -0400 Subject: pkg/api/api0: Implement player info endpoints --- pkg/api/api0/api.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkg/api/api0/api.go') diff --git a/pkg/api/api0/api.go b/pkg/api/api0/api.go index dad246c..40aa90b 100644 --- a/pkg/api/api0/api.go +++ b/pkg/api/api0/api.go @@ -19,12 +19,17 @@ import ( ) type Handler struct { + PdataStorage PdataStorage } func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Set("Server", "Atlas") switch { + case strings.HasPrefix(r.URL.Path, "/player/"): + // TODO: rate limit + h.handlePlayer(w, r) + return default: http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound) return -- cgit v1.2.3