import { ALERTS_TARGET_INDICES_URL } from '../../constants' ; import { GetService } from '../../types' ; import { User } from '../authentication/types' ; import { getSpaceUrlPrefix } from '../authentication/spaces' ; export const getAlertsTargetIndices = async ( getService , user , spaceId ) => { const supertest = getService ( 'supertestWithoutAuth' ) ; return supertest . get ( `${ getSpaceUrlPrefix ( spaceId ) }${ ALERTS_TARGET_INDICES_URL }` ) . auth ( user . username , user . password ) . send ( ) . set ( 'kbn-xsrf' , 'foo' ) ; } ;