Files
probo/pkg/server/api/console/v1/common_third_party_resolvers.go
Ludovic Vielle 3475dd0560 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>
2026-06-11 10:47:28 +02:00

35 lines
1.0 KiB
Go

package console_v1
// This file will be automatically regenerated based on the schema, any resolver
// implementations
// will be copied through when generating and any unknown code will be moved to the end.
// Code generated by github.com/99designs/gqlgen version v0.17.90
import (
"context"
"go.probo.inc/probo/pkg/probo"
"go.probo.inc/probo/pkg/server/api/console/v1/schema"
"go.probo.inc/probo/pkg/server/api/console/v1/types"
)
// Logo is the resolver for the logo field.
func (r *commonThirdPartyResolver) Logo(ctx context.Context, obj *types.CommonThirdParty) (*types.File, error) {
if _, err := r.authorize(ctx, obj.ID, probo.ActionCommonThirdPartyGet); err != nil {
return nil, err
}
if obj.Logo == nil {
return nil, nil
}
return r.loadFile(ctx, obj.Logo.ID)
}
// CommonThirdParty returns schema.CommonThirdPartyResolver implementation.
func (r *Resolver) CommonThirdParty() schema.CommonThirdPartyResolver {
return &commonThirdPartyResolver{r}
}
type commonThirdPartyResolver struct{ *Resolver }