Skip to content

Commit

Permalink
Merge pull request #3 from Stratoscale/fix-query-gen
Browse files Browse the repository at this point in the history
only generate query if model has params
  • Loading branch information
Eyal Posener authored Mar 21, 2018
2 parents a735e0f + 45d34d8 commit b365cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/server/configureapi.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func Handler(c Config) (http.Handler, error) {
// Those can be used to extract database query from the http path's query string
var (
{{ range .Models -}}
{{ if not .Items -}}
{{ if and (not .Items) .Properties -}}
{{ pascalize .Name}}QueryParse = query.MustNewBuilder(&query.Config{Model: models.{{ pascalize .Name}}{}}).ParseRequest
{{ end -}}
{{ end -}}
Expand Down

0 comments on commit b365cc5

Please sign in to comment.