From 5328873483ee7e9b6aafd7e04f98aaad4d2af3c2 Mon Sep 17 00:00:00 2001 From: Marco Reinwarth Date: Thu, 25 Apr 2019 12:04:18 +0200 Subject: [PATCH] Replace hard coded serviceId --- cmd/vacation.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/vacation.go b/cmd/vacation.go index 9c826d1..c11aab0 100644 --- a/cmd/vacation.go +++ b/cmd/vacation.go @@ -52,9 +52,14 @@ var vacationDetailCommand = &cobra.Command{ return errors.New(textProjectOrServiceNotConfigured) } + serviceId, err := strconv.Atoi(vacationActivity.ServiceId) + if err != nil { + return errors.New(textProjectOrServiceNotConfigured) + } + entries, err := application.MiteApi.TimeEntries(&domain.TimeEntryQuery{ At: entryListFilterAtThisYear, - ServiceId: 285835, // => user config, if not set explain how + ServiceId: domain.NewServiceId(serviceId), }) if err != nil { return err