Skip to content

Commit

Permalink
refactor(SPV-793): use generic type call to function instead of provi…
Browse files Browse the repository at this point in the history
…ding typed parameter.
  • Loading branch information
dorzepowski committed Aug 26, 2024
1 parent 10f94a4 commit ac2d184
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/query/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/mitchellh/mapstructure"
)

func ParseSearchParams[T any](c *gin.Context, _ T) (*filter.SearchParams[T], error) {
func ParseSearchParams[T any](c *gin.Context) (*filter.SearchParams[T], error) {
var params filter.SearchParams[T]

dicts, err := ShouldGetQueryNestedMap(c)
Expand Down
2 changes: 1 addition & 1 deletion internal/query/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestParseSearchParamsSuccessfully(t *testing.T) {
},
}

params, err := ParseSearchParams(c, ExampleConditionsForTests{})
params, err := ParseSearchParams[ExampleConditionsForTests](c)
require.NoError(t, err)
require.EqualValues(t, test.expectedResult, *params)
})
Expand Down

0 comments on commit ac2d184

Please sign in to comment.