diff options
Diffstat (limited to 'pkg/api/api0')
-rw-r--r-- | pkg/api/api0/accounts.go | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/pkg/api/api0/accounts.go b/pkg/api/api0/accounts.go index d3fc120..a19a908 100644 --- a/pkg/api/api0/accounts.go +++ b/pkg/api/api0/accounts.go @@ -114,16 +114,10 @@ func (h *Handler) handleAccountsWritePersistence(w http.ResponseWriter, r *http. return } - serverID := r.URL.Query().Get("serverId") - if serverID == "" { - respJSON(w, r, http.StatusBadRequest, map[string]any{ - "success": false, - "error": ErrorCode_BAD_REQUEST, - "msg": ErrorCode_BAD_REQUEST.Messagef("serverId param is required"), - }) - return + serverID := r.URL.Query().Get("serverId") // blank on listen server + if serverID != "" { + // TODO: check serverID } - // TODO: check serverID raddr, err := netip.ParseAddrPort(r.RemoteAddr) if err != nil { |