mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
22 lines
435 B
JavaScript
22 lines
435 B
JavaScript
'use strict';
|
|
|
|
import request from '../utils/request';
|
|
|
|
import { getCurrentSubdomain } from '../utils/url';
|
|
|
|
|
|
let LicenseFetcher = {
|
|
/**
|
|
* Fetch the available licenses from the API (might be bound to the subdomain e.g. cc.ascribe.io).
|
|
*/
|
|
fetch() {
|
|
const query = {
|
|
subdomain: getCurrentSubdomain()
|
|
};
|
|
|
|
return request('licenses', { query });
|
|
}
|
|
};
|
|
|
|
export default LicenseFetcher;
|