aboutsummaryrefslogtreecommitdiffstats
path: root/timetask/http.go
diff options
context:
space:
mode:
authorTeddy Wing2017-06-03 12:42:35 +0200
committerTeddy Wing2017-06-03 12:42:35 +0200
commit758cf0bf7e899acee89ee4b8a39c5565622aee31 (patch)
tree4f4d14b68c09f59b57a2d9f03d2c397a5d48c765 /timetask/http.go
parent1576d4111d412a1c501b6a8630c4d559302b9b21 (diff)
downloadtimetasker-758cf0bf7e899acee89ee4b8a39c5565622aee31.tar.bz2
http.go: Replace `SubmitTimeEntries` with `SubmitTimeEntry`
A slightly altered function that only submits a single time entry and uses our new `Profile`, `Project`, and `TimeEntry` types.
Diffstat (limited to 'timetask/http.go')
-rw-r--r--timetask/http.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/timetask/http.go b/timetask/http.go
index 8b90230..76bfdc3 100644
--- a/timetask/http.go
+++ b/timetask/http.go
@@ -37,13 +37,11 @@ func Login(username, password string) (resp *http.Response, err error) {
}
func SubmitTimeEntry(
+ profile Profile,
project Project,
time_entry TimeEntry,
) (resp *http.Response, err error) {
-}
-
-func SubmitTimeEntries(fields Fields, time_entries []TimeEntry) (resp *http.Response, err error) {
- v := buildSubmissionParams(fields, time_entries)
+ v := buildSubmissionParams(profile, time_entry)
v.Set("module", "time")
v.Set("action", "submitmultipletime")
@@ -51,6 +49,7 @@ func SubmitTimeEntries(fields Fields, time_entries []TimeEntry) (resp *http.Resp
return nil, nil
}
+
func buildSubmissionParams(profile Profile, time_entry TimeEntry) url.Values {
v := url.Values{}