From 78ba04ff105ec207b8318487c20d642320347c69 Mon Sep 17 00:00:00 2001 From: Dante Catalfamo <43040593+dantecatalfamo@users.noreply.github.com> Date: Wed, 18 Jun 2025 13:12:58 -0400 Subject: [PATCH] Fix policy autofill using incorrect media-type for query (#30112) #30066 --- changes/30066-policy-autofill-media-type | 1 + frontend/services/entities/autofill.ts | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) create mode 100644 changes/30066-policy-autofill-media-type diff --git a/changes/30066-policy-autofill-media-type b/changes/30066-policy-autofill-media-type new file mode 100644 index 0000000000..1b06b0bf47 --- /dev/null +++ b/changes/30066-policy-autofill-media-type @@ -0,0 +1 @@ +Fixed policy autofill using incorrect media-type for query diff --git a/frontend/services/entities/autofill.ts b/frontend/services/entities/autofill.ts index d1b49a6619..c52504da50 100644 --- a/frontend/services/entities/autofill.ts +++ b/frontend/services/entities/autofill.ts @@ -10,9 +10,6 @@ export default { getPolicyInterpretationFromSQL: (sql: string): Promise => { const { AUTOFILL_POLICY } = endpoints; - // API expects JSON object with key "sql" - const data = JSON.stringify({ sql }); - - return sendRequest("POST", AUTOFILL_POLICY, data); + return sendRequest("POST", AUTOFILL_POLICY, { sql }); }, };