Skip to content

Commit

Permalink
directly send the response instead of processing
Browse files Browse the repository at this point in the history
Signed-off-by: MUzairS15 <[email protected]>
  • Loading branch information
MUzairS15 committed Aug 18, 2024
1 parent 1d5d3f9 commit 03fd3d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions models/meshmodel/core/policies/rego_policy_relationship.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ func (r *Rego) RegoPolicyHandler(designFile pattern.PatternFile, regoQueryString
return evaluationResponse, ErrEval(fmt.Errorf("evaluation results are empty"))
}

evaluatedPatternFile, err := utils.MarshalAndUnmarshal[interface{}, pattern.PatternFile](evalResults)
evaluationResponse, err = utils.MarshalAndUnmarshal[interface{}, pattern.EvaluationResponse](evalResults)
if err != nil {
return evaluationResponse, err
}
evaluationResponse.Design = evaluatedPatternFile

return evaluationResponse, nil

}

0 comments on commit 03fd3d2

Please sign in to comment.