diff options
author | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-13 02:41:03 -0400 |
---|---|---|
committer | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-13 02:41:03 -0400 |
commit | 4999ad031c0d96635c0669d4827188fdf64192f8 (patch) | |
tree | 2b472c3aa5bc5773250e88ceb34f6d4cf7e572c5 /pkg/api/api0/api.go | |
parent | 8b1791d9983945d0f1695056dd015ceb9b90c8ca (diff) | |
download | Atlas-4999ad031c0d96635c0669d4827188fdf64192f8.tar.gz Atlas-4999ad031c0d96635c0669d4827188fdf64192f8.zip |
pkg/api/api0: Implement player info endpoints
Diffstat (limited to 'pkg/api/api0/api.go')
-rw-r--r-- | pkg/api/api0/api.go | 5 |
1 files changed, 5 insertions, 0 deletions
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 |