Skip to content

Commit

Permalink
fix: unused parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassabreu committed May 25, 2024
1 parent 1b8061f commit 4fa1c5d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,15 +439,13 @@ type GetUserTimeEntriesParam struct {

// GetUserTimeEntries will list the time entries of a user on a workspace, can be paginated
func (c *client) GetUserTimeEntries(p GetUserTimeEntriesParam) ([]dto.TimeEntryImpl, error) {
var tes []dto.TimeEntryImpl
return getUserTimeEntriesImpl(c, p, false, &tes)
return getUserTimeEntriesImpl[dto.TimeEntryImpl](c, p, false)

Check warning on line 442 in api/client.go

View check run for this annotation

Codecov / codecov/patch

api/client.go#L442

Added line #L442 was not covered by tests

}

// GetUsersHydratedTimeEntries will list hydrated time entries of a user on a workspace, can be paginated
func (c *client) GetUsersHydratedTimeEntries(p GetUserTimeEntriesParam) ([]dto.TimeEntry, error) {
var timeEntries []dto.TimeEntry
timeEntries, err := getUserTimeEntriesImpl(c, p, true, &timeEntries)
timeEntries, err := getUserTimeEntriesImpl[dto.TimeEntry](c, p, true)

Check warning on line 448 in api/client.go

View check run for this annotation

Codecov / codecov/patch

api/client.go#L448

Added line #L448 was not covered by tests

if err != nil {
return timeEntries, err
Expand All @@ -469,7 +467,6 @@ func getUserTimeEntriesImpl[K dto.TimeEntry | dto.TimeEntryImpl](
c *client,
p GetUserTimeEntriesParam,
hydrated bool,
tmpl *[]K,
) (tes []K, err error) {

Check warning on line 470 in api/client.go

View check run for this annotation

Codecov / codecov/patch

api/client.go#L470

Added line #L470 was not covered by tests
defer wrapError(&err, "get time entries from user \"%s\"", p.UserID)

Expand Down

0 comments on commit 4fa1c5d

Please sign in to comment.