Refactor SOA generation

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-07-07 15:44:22 +02:00
parent ba71f0d725
commit afa5a822aa
16 changed files with 1008 additions and 1070 deletions

View File

@@ -1189,7 +1189,10 @@ func (r *mutationResolver) GenerateFrameworkStateOfApplicability(ctx context.Con
}
return &types.GenerateFrameworkStateOfApplicabilityPayload{
DownloadURL: soa,
Data: fmt.Sprintf(
"data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,%s",
base64.StdEncoding.EncodeToString(soa),
),
}, nil
}
@@ -2051,19 +2054,6 @@ func (r *mutationResolver) CreateVendorRiskAssessment(ctx context.Context, input
}, nil
}
// ExportAudit is the resolver for the exportAudit field.
func (r *mutationResolver) ExportAudit(ctx context.Context, input types.ExportAuditInput) (*types.ExportAuditPayload, error) {
prb := r.ProboService(ctx, input.FrameworkID.TenantID())
fileUrl, err := prb.Frameworks.ExportAudit(ctx, input.FrameworkID)
if err != nil {
panic(fmt.Errorf("cannot export audit: %w", err))
}
return &types.ExportAuditPayload{
URL: fileUrl,
}, nil
}
// AssessVendor is the resolver for the assessVendor field.
func (r *mutationResolver) AssessVendor(ctx context.Context, input types.AssessVendorInput) (*types.AssessVendorPayload, error) {
prb := r.ProboService(ctx, input.ID.TenantID())