Skip to content

Commit

Permalink
Fix up repo usage for single DL get
Browse files Browse the repository at this point in the history
  • Loading branch information
elffjs committed Nov 2, 2024
1 parent 49fcb2f commit cb7b0ce
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions graph/developerlicense.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion graph/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ type DeveloperLicenseRepository interface {
GetSignersForLicense(ctx context.Context, obj *model.DeveloperLicense, first *int, after *string, last *int, before *string) (*model.SignerConnection, error)
GetRedirectURIsForLicense(ctx context.Context, obj *model.DeveloperLicense, first *int, after *string, last *int, before *string) (*model.RedirectURIConnection, error)

GetLicense(ctx context.Context, by *model.DeveloperLicenseBy) (*model.DeveloperLicense, error)
GetLicense(ctx context.Context, by model.DeveloperLicenseBy) (*model.DeveloperLicense, error)
}

// Resolver holds the repositories for the graph resolvers.
Expand Down
2 changes: 1 addition & 1 deletion internal/repositories/developerlicense/developerlicense.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ func (r *Repository) GetRedirectURIsForLicense(ctx context.Context, obj *gmodel.
return res, nil
}

func (r *Repository) GetLicense(ctx context.Context, by *gmodel.DeveloperLicenseBy) (*gmodel.DeveloperLicense, error) {
func (r *Repository) GetLicense(ctx context.Context, by gmodel.DeveloperLicenseBy) (*gmodel.DeveloperLicense, error) {
if base.CountTrue(by.ClientID != nil, by.TokenID != nil, by.Alias != nil) != 1 {
return nil, fmt.Errorf("must specify exactly one of `clientId`, `tokenId`, or `alias`")
}
Expand Down

0 comments on commit cb7b0ce

Please sign in to comment.