Fix controls and frameworks small issues
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -1761,7 +1761,7 @@ input CreateControlInput {
|
||||
sectionTitle: String!
|
||||
name: String!
|
||||
description: String!
|
||||
status: ControlStatus
|
||||
status: ControlStatus!
|
||||
exclusionJustification: String
|
||||
}
|
||||
|
||||
|
||||
@@ -6718,7 +6718,7 @@ input CreateControlInput {
|
||||
sectionTitle: String!
|
||||
name: String!
|
||||
description: String!
|
||||
status: ControlStatus
|
||||
status: ControlStatus!
|
||||
exclusionJustification: String
|
||||
}
|
||||
|
||||
@@ -38150,7 +38150,7 @@ func (ec *executionContext) unmarshalInputCreateControlInput(ctx context.Context
|
||||
it.Description = data
|
||||
case "status":
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("status"))
|
||||
data, err := ec.unmarshalOControlStatus2ᚖgithubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐControlStatus(ctx, v)
|
||||
data, err := ec.unmarshalNControlStatus2githubᚗcomᚋgetproboᚋproboᚋpkgᚋcoredataᚐControlStatus(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
|
||||
@@ -169,12 +169,12 @@ type CreateControlDocumentMappingPayload struct {
|
||||
}
|
||||
|
||||
type CreateControlInput struct {
|
||||
FrameworkID gid.GID `json:"frameworkId"`
|
||||
SectionTitle string `json:"sectionTitle"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Status *coredata.ControlStatus `json:"status,omitempty"`
|
||||
ExclusionJustification *string `json:"exclusionJustification,omitempty"`
|
||||
FrameworkID gid.GID `json:"frameworkId"`
|
||||
SectionTitle string `json:"sectionTitle"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Status coredata.ControlStatus `json:"status"`
|
||||
ExclusionJustification *string `json:"exclusionJustification,omitempty"`
|
||||
}
|
||||
|
||||
type CreateControlMeasureMappingInput struct {
|
||||
|
||||
@@ -1201,10 +1201,12 @@ func (r *mutationResolver) CreateControl(ctx context.Context, input types.Create
|
||||
prb := r.ProboService(ctx, input.FrameworkID.TenantID())
|
||||
|
||||
control, err := prb.Controls.Create(ctx, probo.CreateControlRequest{
|
||||
FrameworkID: input.FrameworkID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
SectionTitle: input.SectionTitle,
|
||||
FrameworkID: input.FrameworkID,
|
||||
Name: input.Name,
|
||||
Description: input.Description,
|
||||
SectionTitle: input.SectionTitle,
|
||||
Status: &input.Status,
|
||||
ExclusionJustification: input.ExclusionJustification,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot create control: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user