style(player): satisfy zone handler lint

This commit is contained in:
Lukáš Lipinský
2026-09-05 11:38:49 +02:00
committed by Tobias Gesellchen
parent ca2e2f9257
commit cb441da981
+2
View File
@@ -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