aboutsummaryrefslogtreecommitdiff
path: root/pkg/api/api0/api.go
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-13 12:11:14 -0400
committerpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-13 12:11:14 -0400
commitbff9a5ca7c1ed1ab0af80d9cad17b63672f9a9fc (patch)
tree20871c802f5012c478c19929906b573d0a22c532 /pkg/api/api0/api.go
parent6c160b6aa6a4127ba151f8ea2f4f314d9758d5db (diff)
downloadAtlas-bff9a5ca7c1ed1ab0af80d9cad17b63672f9a9fc.tar.gz
Atlas-bff9a5ca7c1ed1ab0af80d9cad17b63672f9a9fc.zip
pkg/api/api0: Implement account endpoints
* POST /accounts/write_persistence?id&serverId multipart(file.pdata) * GET /accounts/get_username?uid * GET /accounts/lookup_uid?username
Diffstat (limited to 'pkg/api/api0/api.go')
-rw-r--r--pkg/api/api0/api.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/api/api0/api.go b/pkg/api/api0/api.go
index 8273435..4e8c064 100644
--- a/pkg/api/api0/api.go
+++ b/pkg/api/api0/api.go
@@ -8,6 +8,7 @@
// - Some rate limits (no longer necessary due to increased performance and better caching) have been removed.
// - More HTTP methods and features are supported (e.g., HEAD, OPTIONS, Content-Encoding).
// - Website split into a separate handler (set Handler.NotFound to http.HandlerFunc(web.ServeHTTP) for identical behaviour).
+// - /accounts/write_persistence returns a error message for easier debugging.
package api0
import (
@@ -36,6 +37,12 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Server", "Atlas")
switch r.URL.Path {
+ case "/accounts/write_persistence":
+ h.handleAccountsWritePersistence(w, r)
+ case "/accounts/get_username":
+ h.handleAccountsGetUsername(w, r)
+ case "/accounts/lookup_uid":
+ h.handleAccountsLookupUID(w, r)
default:
if strings.HasPrefix(r.URL.Path, "/player/") {
// TODO: rate limit