aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 09:47:03 -0400
committerpg9182 <96569817+pg9182@users.noreply.github.com>2022-10-15 09:47:03 -0400
commitdcd5b19fd9daaa5f0b69dbf98c512bff09ccdee7 (patch)
tree2da3204bd9408660b8f36793f31d9d261a7080d3
parent0ab45de6037f07fb439a7df3161c012342e64cd1 (diff)
downloadAtlas-dcd5b19fd9daaa5f0b69dbf98c512bff09ccdee7.tar.gz
Atlas-dcd5b19fd9daaa5f0b69dbf98c512bff09ccdee7.zip
pkg/api/api0: Simplify error handling for /client/auth_with_self
The player token is already validated later if necessary.
-rw-r--r--pkg/api/api0/client.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/pkg/api/api0/client.go b/pkg/api/api0/client.go
index 5a8aaf6..a135052 100644
--- a/pkg/api/api0/client.go
+++ b/pkg/api/api0/client.go
@@ -342,14 +342,6 @@ func (h *Handler) handleClientAuthWithSelf(w http.ResponseWriter, r *http.Reques
}
playerToken := r.URL.Query().Get("playerToken")
- if playerToken == "" {
- respJSON(w, r, http.StatusBadRequest, map[string]any{
- "success": false,
- "error": ErrorCode_BAD_REQUEST,
- "msg": ErrorCode_BAD_REQUEST.Messagef("playerToken param is required"),
- })
- return
- }
acct, err := h.AccountStorage.GetAccount(uid)
if err != nil {