Switch console file fields to File download URLs
Replace presigned URL string fields (logoUrl, fileUrl, ndaFileName, etc.) with nested File references resolved through /api/files/v1/. Update console Relay queries and e2e coverage accordingly. Route NDA upload through filemanager.PutFile and return stable IAM org logo URLs for consistency with the files API. Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
@@ -8,7 +8,6 @@ package console_v1
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
@@ -332,15 +331,7 @@ func (r *queryResolver) Node(ctx context.Context, id gid.GID) (types.Node, error
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var file *coredata.File
|
||||
if trustCenter.NonDisclosureAgreementFileID != nil {
|
||||
file, err = r.probo.Files.Get(ctx, scope, *trustCenter.NonDisclosureAgreementFileID)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot get NDA file: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
return types.NewTrustCenter(trustCenter, file), nil
|
||||
return types.NewTrustCenter(trustCenter), nil
|
||||
}
|
||||
case coredata.TrustCenterAccessEntityType:
|
||||
action = probo.ActionTrustCenterAccessGet
|
||||
|
||||
Reference in New Issue
Block a user