diff --git a/x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/create_new_index_pattern.ts b/x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/create_new_index_pattern.ts index f99b965458d906..d612c25157095f 100644 --- a/x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/create_new_index_pattern.ts +++ b/x-pack/plugins/maps/public/classes/layers/new_vector_layer_wizard/create_new_index_pattern.ts @@ -12,7 +12,7 @@ export const createNewIndexAndPattern = async (indexName: string) => { return await getHttp().fetch({ path: `/${INDEX_SOURCE_API_PATH}`, method: 'POST', - body: convertObjectToBlob({ + body: JSON.stringify({ index: indexName, // Initially set to static mappings mappings: { @@ -25,7 +25,3 @@ export const createNewIndexAndPattern = async (indexName: string) => { }), }); }; - -const convertObjectToBlob = (obj: unknown) => { - return new Blob([JSON.stringify(obj)], { type: 'application/json' }); -};