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":
if !pomodoro.IsPomodoroOngoing() {
if clientCommand.PomodoroSettings != (models.GoTomatoPomodoroConfig{}) {
shared.Message.Settings = clientCommand.PomodoroSettings
shared.Message.TimeLeft = clientCommand.PomodoroSettings.Work
if clientCommand.Settings != (models.GoTomatoPomodoroConfig{}) {
shared.Message.Settings = clientCommand.Settings
shared.Message.TimeLeft = clientCommand.Settings.Work
}
}

View file

@ -10,7 +10,7 @@ import (
type ClientCommand struct {
Command string `json:"command"` // comman send to the server
Password string `json:"password"` // pomodoro control password
PomodoroSettings GoTomatoPomodoroConfig `json:"settings"` // pomodoro config
Settings GoTomatoPomodoroConfig `json:"settings"` // pomodoro config
}
type Client struct {