Skip to content

Commit

Permalink
[ML] Fixing field caps wrapper endpoint (elastic#77546)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic committed Sep 16, 2020
1 parent ee8bc62 commit 54f0d15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x-pack/plugins/ml/server/routes/indices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function indicesRoutes({ router, mlLicense }: RouteInitialization) {
requestFields !== undefined && Array.isArray(requestFields)
? requestFields.join(',')
: '*';
const { body } = await client.asInternalUser.fieldCaps({ index, fields });
const { body } = await client.asCurrentUser.fieldCaps({ index, fields });
return response.ok({ body });
} catch (e) {
return response.customError(wrapError(e));
Expand Down

0 comments on commit 54f0d15

Please sign in to comment.