2015-06-30 10:42:58 +02:00
|
|
|
'use strict';
|
|
|
|
|
2016-06-14 16:53:18 +02:00
|
|
|
import request from '../utils/request';
|
2015-06-30 10:42:58 +02:00
|
|
|
|
2016-06-13 17:33:47 +02:00
|
|
|
import { getCurrentSubdomain } from '../utils/url';
|
2015-09-29 14:58:56 +02:00
|
|
|
|
|
|
|
|
2015-06-30 10:42:58 +02:00
|
|
|
let LicenseFetcher = {
|
|
|
|
/**
|
|
|
|
* Fetch the available licenses from the API (might be bound to the subdomain e.g. cc.ascribe.io).
|
|
|
|
*/
|
|
|
|
fetch() {
|
2016-06-14 16:53:18 +02:00
|
|
|
const query = {
|
|
|
|
subdomain: getCurrentSubdomain()
|
|
|
|
};
|
|
|
|
|
|
|
|
return request('licenses', { query });
|
2015-06-30 10:42:58 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default LicenseFetcher;
|