[Enterprise Search][Search application]Fix Create Api key url (#159519)

## Summary

Fixes regression issue, probably created when `engines` were renamed to
`Search applications` in backend. The Create api key `POST` request was
requesting to incorrect url. Replaced with correct url in this PR.
This commit is contained in:
Saarika Bhasi 2023-06-12 17:21:08 -04:00 committed by GitHub
parent 662f11ee21
commit e03d901b56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -34,7 +34,7 @@ describe('GenerateEngineApiKeyLogic', () => {
});
await nextTick();
expect(http.post).toHaveBeenCalledWith(
'/internal/enterprise_search/engines/puggles/api_key',
'/internal/enterprise_search/search_applications/puggles/api_key',
{
body: JSON.stringify({
keyName: 'puggles read only key',

View file

@ -24,7 +24,7 @@ export const generateEngineApiKey = async ({
engineName: string;
keyName: string;
}) => {
const route = `/internal/enterprise_search/engines/${engineName}/api_key`;
const route = `/internal/enterprise_search/search_applications/${engineName}/api_key`;
return await HttpLogic.values.http.post<APIKeyResponse>(route, {
body: JSON.stringify({