2018-06-01 15:04:56 +00:00
|
|
|
import getAPI from '@hashicorp/ember-cli-api-double';
|
2018-05-11 12:47:21 +00:00
|
|
|
import setCookies from 'consul-ui/tests/helpers/set-cookies';
|
|
|
|
import typeToURL from 'consul-ui/tests/helpers/type-to-url';
|
2018-07-02 18:02:16 +00:00
|
|
|
import config from 'consul-ui/config/environment';
|
|
|
|
const apiConfig = config['ember-cli-api-double'];
|
|
|
|
let path = '/consul-api-double';
|
|
|
|
let reader;
|
|
|
|
if (apiConfig) {
|
|
|
|
const temp = apiConfig.endpoints[0].split('/');
|
|
|
|
reader = apiConfig.reader;
|
|
|
|
temp.pop();
|
|
|
|
path = temp.join('/');
|
|
|
|
}
|
|
|
|
export default getAPI(path, setCookies, typeToURL, reader);
|