feat: add Password field to PomodoroClient struct

remove unused password parameters from Client-Methods

🤖
This commit is contained in:
Sebastian Mark 2024-10-30 09:00:29 +01:00
parent 0ca90b50a5
commit b374ee8aff
4 changed files with 10 additions and 8 deletions

View file

@ -25,19 +25,19 @@ func (c Client) sendClientCommand(msg GoTomato.ClientCommand) {
}
}
func (c Client) SendCmd(pwd string, cmd string) {
func (c Client) SendCmd(cmd string) {
message := GoTomato.ClientCommand{
Command: cmd,
Password: pwd,
Password: c.Password,
}
c.sendClientCommand(message)
}
func (c Client) SendSettingsUpdate(pwd string, settings GoTomato.PomodoroConfig) {
func (c Client) SendSettingsUpdate(settings GoTomato.PomodoroConfig) {
message := GoTomato.ClientCommand{
Command: "updateSettings",
Password: pwd,
Password: c.Password,
Settings: settings,
}