From cb441da9811d70577b5cb483c729e54add937c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lipinsk=C3=BD?= <6032558+Mr-Tao@users.noreply.github.com> Date: Thu, 27 Aug 2026 01:04:50 +0200 Subject: [PATCH] style(player): satisfy zone handler lint --- pkg/service/soundtouchweb/handler.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/service/soundtouchweb/handler.go b/pkg/service/soundtouchweb/handler.go index 698b7cba..9ba89437 100644 --- a/pkg/service/soundtouchweb/handler.go +++ b/pkg/service/soundtouchweb/handler.go @@ -1078,6 +1078,7 @@ func (app *WebApp) HandleGetZone(w http.ResponseWriter, r *http.Request) { // becomes the master. func (app *WebApp) HandleZoneAdd(w http.ResponseWriter, r *http.Request) { masterIP := chi.URLParam(r, "id") + slaveIP := chi.URLParam(r, "slaveId") if masterIP == slaveIP { app.sendError(w, "A device cannot be added to its own zone", http.StatusBadRequest) @@ -1100,6 +1101,7 @@ func (app *WebApp) HandleZoneAdd(w http.ResponseWriter, r *http.Request) { app.sendError(w, "Device not ready", http.StatusInternalServerError) return } + if masterConn.DeviceInfo.DeviceID == slaveConn.DeviceInfo.DeviceID { app.sendError(w, "A device cannot be added to its own zone", http.StatusBadRequest) return