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:
Ludovic Vielle
2026-06-10 14:40:33 +02:00
parent 003fd2baf1
commit 3475dd0560
50 changed files with 545 additions and 386 deletions

View File

@@ -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