@fleetbase/ember-core 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,6 +9,10 @@ import { pluralize } from 'ember-inflector';
|
|
|
9
9
|
import getUserOptions from '../utils/get-user-options';
|
|
10
10
|
import config from 'ember-get-config';
|
|
11
11
|
|
|
12
|
+
if (isBlank(config.API.host)) {
|
|
13
|
+
config.API.host = `${window.location.protocol}//${window.location.hostname}:8000`;
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
export default class ApplicationAdapter extends RESTAdapter {
|
|
13
17
|
/**
|
|
14
18
|
* Inject the `session` service
|
package/addon/services/fetch.js
CHANGED
|
@@ -17,6 +17,10 @@ import download from '../utils/download';
|
|
|
17
17
|
import getUserOptions from '../utils/get-user-options';
|
|
18
18
|
import fetch from 'fetch';
|
|
19
19
|
|
|
20
|
+
if (isBlank(config.API.host)) {
|
|
21
|
+
config.API.host = `${window.location.protocol}//${window.location.hostname}:8000`;
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
export default class FetchService extends Service {
|
|
21
25
|
/**
|
|
22
26
|
* Creates an instance of FetchService.
|
package/package.json
CHANGED