Refactor SOA generation
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user