fix(query): reduce app query overhead (#7817)

* fix(query): reduce app query overhead
This commit is contained in:
Silvan
2024-04-22 11:30:56 +02:00
committed by GitHub
parent cca4b715c0
commit 13b566e0d9
2 changed files with 179 additions and 29 deletions

View File

@@ -475,11 +475,8 @@ func (o *OPStorage) assertProjectRoleScopes(ctx context.Context, clientID string
return scopes, nil
}
}
projectID, err := o.query.ProjectIDFromOIDCClientID(ctx, clientID)
if err != nil {
return nil, zerrors.ThrowPreconditionFailed(nil, "OIDC-AEG4d", "Errors.Internal")
}
project, err := o.query.ProjectByID(ctx, false, projectID)
project, err := o.query.ProjectByOIDCClientID(ctx, clientID)
if err != nil {
return nil, zerrors.ThrowPreconditionFailed(nil, "OIDC-w4wIn", "Errors.Internal")
}