break: rename ClientCommand.PomodoroSettings
-> .Settings
This commit is contained in:
parent
61b2f71bf3
commit
16bc946a30
2 changed files with 6 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@ import (
|
|||
|
||||
// ClientCommand represents a command from the client (start/stop).
|
||||
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
|
||||
Command string `json:"command"` // comman send to the server
|
||||
Password string `json:"password"` // pomodoro control password
|
||||
Settings GoTomatoPomodoroConfig `json:"settings"` // pomodoro config
|
||||
}
|
||||
|
||||
type Client struct {
|
||||
|
|
Loading…
Reference in a new issue