From dcd5b19fd9daaa5f0b69dbf98c512bff09ccdee7 Mon Sep 17 00:00:00 2001 From: pg9182 <96569817+pg9182@users.noreply.github.com> Date: Sat, 15 Oct 2022 09:47:03 -0400 Subject: pkg/api/api0: Simplify error handling for /client/auth_with_self The player token is already validated later if necessary. --- pkg/api/api0/client.go | 8 -------- 1 file changed, 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 { -- cgit v1.2.3