Fix policy autofill using incorrect media-type for query (#30112)

#30066
This commit is contained in:
Dante Catalfamo 2025-06-18 13:12:58 -04:00 committed by GitHub
parent 44a9d2d69e
commit 78ba04ff10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -0,0 +1 @@
Fixed policy autofill using incorrect media-type for query

View file

@ -10,9 +10,6 @@ export default {
getPolicyInterpretationFromSQL: (sql: string): Promise<IAutofillPolicy> => {
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 });
},
};