From 84b921283c4106de55ca7908a58e8f1621b3841f Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 3 Jun 2017 13:35:41 +0200 Subject: 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. --- timetask/http.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'timetask') 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( -- cgit v1.2.3