break: rename ClientCommand.PomodoroSettings -> .Settings

This commit is contained in:
Sebastian Mark 2024-10-26 09:16:48 +02:00
parent 61b2f71bf3
commit 16bc946a30
2 changed files with 6 additions and 6 deletions

View file

@ -49,9 +49,9 @@ func handleClientCommands(ws *websocket.Conn) {
} }
case "updateSettings": case "updateSettings":
if !pomodoro.IsPomodoroOngoing() { if !pomodoro.IsPomodoroOngoing() {
if clientCommand.PomodoroSettings != (models.GoTomatoPomodoroConfig{}) { if clientCommand.Settings != (models.GoTomatoPomodoroConfig{}) {
shared.Message.Settings = clientCommand.PomodoroSettings shared.Message.Settings = clientCommand.Settings
shared.Message.TimeLeft = clientCommand.PomodoroSettings.Work shared.Message.TimeLeft = clientCommand.Settings.Work
} }
} }

View file

@ -8,9 +8,9 @@ import (
// ClientCommand represents a command from the client (start/stop). // ClientCommand represents a command from the client (start/stop).
type ClientCommand struct { type ClientCommand struct {
Command string `json:"command"` // comman send to the server Command string `json:"command"` // comman send to the server
Password string `json:"password"` // pomodoro control password Password string `json:"password"` // pomodoro control password
PomodoroSettings GoTomatoPomodoroConfig `json:"settings"` // pomodoro config Settings GoTomatoPomodoroConfig `json:"settings"` // pomodoro config
} }
type Client struct { type Client struct {