Skip to content

Commit

Permalink
Updated decision evaluation to use query param because of proxy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
timwekkenbc committed Jun 18, 2024
1 parent 0cebef2 commit 924685e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,13 @@ export const getSubmissionFromCHEFSById = async (formId: string, id: string) =>
*/
export const postDecision = async (jsonFile: string, context: unknown) => {
try {
const { data } = await axiosAPIInstance.post(`/decisions/evaluate/${jsonFile}`, {
context,
trace: true,
});
const { data } = await axiosAPIInstance.post(
`/decisions/evaluateByFile/?ruleFileName=${encodeURIComponent(jsonFile)}`,
{
context,
trace: true,
}
);
return data;
} catch (error) {
console.error(`Error simulating decision: ${error}`);
Expand Down

0 comments on commit 924685e

Please sign in to comment.