aboutsummaryrefslogtreecommitdiffstats
path: root/timetask
diff options
context:
space:
mode:
authorTeddy Wing2017-06-03 13:35:41 +0200
committerTeddy Wing2017-06-03 13:39:01 +0200
commit84b921283c4106de55ca7908a58e8f1621b3841f (patch)
tree6a533bb38703f978492ade479e78a0ff10b6150a /timetask
parent2bd0cb518e1eee9be503aea5198889253aa435f7 (diff)
downloadtimetasker-84b921283c4106de55ca7908a58e8f1621b3841f.tar.bz2
SubmitTimeEntry(): Remove `Profile` & `Project` arguments
Now that `Profile` and `Project` have been subsumed into `TimeEntry` (f017c462593496efbc0810ec2603da49a2e3d9d8), these arguments should no longer be here and their data should come from `TimeEntry` instead.
Diffstat (limited to 'timetask')
-rw-r--r--timetask/http.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/timetask/http.go b/timetask/http.go
index 76bfdc3..4f52565 100644
--- a/timetask/http.go
+++ b/timetask/http.go
@@ -37,11 +37,9 @@ func Login(username, password string) (resp *http.Response, err error) {
}
func SubmitTimeEntry(
- profile Profile,
- project Project,
time_entry TimeEntry,
) (resp *http.Response, err error) {
- v := buildSubmissionParams(profile, time_entry)
+ v := buildSubmissionParams(time_entry)
v.Set("module", "time")
v.Set("action", "submitmultipletime")
@@ -50,12 +48,12 @@ func SubmitTimeEntry(
}
-func buildSubmissionParams(profile Profile, time_entry TimeEntry) url.Values {
+func buildSubmissionParams(time_entry TimeEntry) url.Values {
v := url.Values{}
v.Set(
"f_personID0",
- strconv.Itoa(profile.PersonID),
+ strconv.Itoa(time_entry.PersonID),
)
v.Set(