Skip to content

Commit

Permalink
hotfix health check ent template
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasxuu committed Jan 5, 2021
1 parent f85fff0 commit df00b96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/gobay/templates/spec/enttmpl/client.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (c *{{ $client }}) Get(ctx context.Context, id {{ $n.ID.Type }}) (*{{ $n.Na

// CheckHealth try to read a first {{ $n.Name }} entity, okay if NotFound, returns the error if any other error happens.
func (c *{{ $client }}) CheckHealth(ctx context.Context) (error) {
_, err := c.Query().Limit(1).Only(ctx)
_, err := c.Query().Limit(1).All(ctx)
if err != nil && !IsNotFound(err) {
return err
}
Expand Down

0 comments on commit df00b96

Please sign in to comment.