(goal string, configuration config.Configuration)
| 60 | } |
| 61 | |
| 62 | func putGoalHttp(goal string, configuration config.Configuration) error { |
| 63 | requestBody, err := json.Marshal(PutGoalRequest{Goal: goal, User: configuration.TimerUser}) |
| 64 | if err != nil { |
| 65 | return err |
| 66 | } |
| 67 | client := httpclient.CreateHttpClient(configuration.TimerInsecure) |
| 68 | _, err = client.SendRequest(requestBody, "PUT", getGoalUrl(configuration)) |
| 69 | return err |
| 70 | } |
| 71 | |
| 72 | func getGoalUrl(configuration config.Configuration) string { |
| 73 | return configuration.TimerUrl + configuration.TimerRoom + "/goal" |
no test coverage detected