2020-05-19 16:33:31 -04:00
|
|
|
import RESTAdapter from '@ember-data/adapter/rest';
|
|
|
|
|
import config from 'ember-get-config';
|
|
|
|
|
import { get } from '@ember/object';
|
|
|
|
|
|
|
|
|
|
export default class ApplicationAdapter extends RESTAdapter {
|
|
|
|
|
// =attributes
|
|
|
|
|
|
2020-05-20 11:47:31 -04:00
|
|
|
/**
|
|
|
|
|
* Sets host to the `api.host` string in the application's config,
|
|
|
|
|
* if set.
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
|
|
|
|
host = get(config, 'api.host');
|
|
|
|
|
|
2020-05-19 16:33:31 -04:00
|
|
|
/**
|
|
|
|
|
* Sets namespace to the `api.namespace` string in the application's config,
|
|
|
|
|
* if set.
|
|
|
|
|
* @type {string}
|
|
|
|
|
*/
|
|
|
|
|
namespace = get(config, 'api.namespace');
|
|
|
|
|
}
|