[ML] Fixing field caps wrapper endpoint (#77546)

This commit is contained in:
James Gowdy 2020-09-16 09:47:02 +01:00 committed by GitHub
parent 89af7e676d
commit b162cca68d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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));