diff --git a/internal/repositories/developerlicense/developerlicense.go b/internal/repositories/developerlicense/developerlicense.go index 72c69f44..fa207698 100644 --- a/internal/repositories/developerlicense/developerlicense.go +++ b/internal/repositories/developerlicense/developerlicense.go @@ -166,15 +166,15 @@ func (r *Repository) GetSignersForLicense(ctx context.Context, obj *gmodel.Devel return nil, err } - totalCount, err := models.Signers().Count(ctx, r.PDB.DBS().Reader) - if err != nil { - return nil, err - } - queryMods := []qm.QueryMod{ models.SignerWhere.DeveloperLicenseID.EQ(obj.TokenID), } + totalCount, err := models.Signers(queryMods...).Count(ctx, r.PDB.DBS().Reader) + if err != nil { + return nil, err + } + if after != nil { afterCursor, err := pHelp.DecodeCursor(*after) if err != nil { @@ -299,15 +299,15 @@ func (r *Repository) GetRedirectURIsForLicense(ctx context.Context, obj *gmodel. return nil, err } - totalCount, err := models.RedirectUris().Count(ctx, r.PDB.DBS().Reader) - if err != nil { - return nil, err - } - queryMods := []qm.QueryMod{ models.RedirectURIWhere.DeveloperLicenseID.EQ(obj.TokenID), } + totalCount, err := models.RedirectUris(queryMods...).Count(ctx, r.PDB.DBS().Reader) + if err != nil { + return nil, err + } + if after != nil { afterCursor, err := pHelp.DecodeCursor(*after) if err != nil {