Remove tenant service pattern

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-05-20 16:18:23 -07:00
parent 30db98455d
commit 3e4a9be7c0
89 changed files with 3510 additions and 3031 deletions

View File

@@ -373,9 +373,10 @@ func (r *accessSourceResolver) Connector(ctx context.Context, obj *types.AccessS
return nil, nil
}
prb := r.ProboService(ctx, obj.ID.TenantID())
scope := coredata.NewScopeFromObjectID(obj.ID)
prb := r.probo
connector, err := prb.Connectors.Get(ctx, *obj.ConnectorID)
connector, err := prb.Connectors.Get(ctx, scope, *obj.ConnectorID)
if err != nil {
if errors.Is(err, coredata.ErrResourceNotFound) {
return nil, nil
@@ -441,9 +442,10 @@ func (r *accessSourceResolver) NeedsConfiguration(ctx context.Context, obj *type
return false, nil
}
prb := r.ProboService(ctx, obj.ID.TenantID())
scope := coredata.NewScopeFromObjectID(obj.ID)
prb := r.probo
dbConnector, err := prb.Connectors.Get(ctx, *obj.ConnectorID)
dbConnector, err := prb.Connectors.Get(ctx, scope, *obj.ConnectorID)
if err != nil {
if errors.Is(err, coredata.ErrResourceNotFound) {
return false, nil
@@ -502,9 +504,10 @@ func (r *accessSourceResolver) SelectedOrganization(ctx context.Context, obj *ty
return nil, nil
}
prb := r.ProboService(ctx, obj.ID.TenantID())
scope := coredata.NewScopeFromObjectID(obj.ID)
prb := r.probo
dbConnector, err := prb.Connectors.Get(ctx, *obj.ConnectorID)
dbConnector, err := prb.Connectors.Get(ctx, scope, *obj.ConnectorID)
if err != nil {
if errors.Is(err, coredata.ErrResourceNotFound) {
return nil, nil