Add nodes to trust center api

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-09-30 16:32:36 +02:00
parent 0460c11d9e
commit e32927ccf6
4 changed files with 243 additions and 0 deletions

View File

@@ -100,3 +100,28 @@ func (s TrustCenterReferenceService) GenerateLogoURL(
return presignedReq.URL, nil
}
func (s TrustCenterReferenceService) Get(
ctx context.Context,
referenceID gid.GID,
) (*coredata.TrustCenterReference, error) {
reference := &coredata.TrustCenterReference{}
err := s.svc.pg.WithConn(
ctx,
func(conn pg.Conn) error {
err := reference.LoadByID(ctx, conn, s.svc.scope, referenceID)
if err != nil {
return fmt.Errorf("cannot load trust center reference: %w", err)
}
return nil
},
)
if err != nil {
return nil, err
}
return reference, nil
}