[IndexManagement] Use internal base path for API (#164665)

## Summary

The current API is returning 404 as the correct path is internal. This
PR fixes this problem.
This commit is contained in:
Marco Liberati 2023-08-24 12:30:21 +02:00 committed by GitHub
parent ad55946c12
commit 86224d4cf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,7 @@
import { HttpSetup } from '@kbn/core/public';
import { sendRequest, SendRequestResponse } from '../shared_imports';
import { API_BASE_PATH } from '../../common/constants';
import { INTERNAL_API_BASE_PATH } from '../../common/constants';
import { SerializedEnrichPolicy } from '../../common/types';
export interface PublicApiServiceSetup {
@ -33,7 +33,7 @@ export class PublicApiService {
*/
getAllEnrichPolicies() {
return sendRequest(this.http, {
path: `${API_BASE_PATH}/enrich_policies`,
path: `${INTERNAL_API_BASE_PATH}/enrich_policies`,
method: 'get',
});
}