mirror of
https://github.com/ascribe/onion.git
synced 2024-11-16 01:55:07 +01:00
26 lines
515 B
JavaScript
26 lines
515 B
JavaScript
'use strict';
|
|
|
|
import alt from '../alt';
|
|
import LicenseFetcher from '../fetchers/license_fetcher';
|
|
|
|
|
|
class LicenseActions {
|
|
constructor() {
|
|
this.generateActions(
|
|
'updateLicenses'
|
|
);
|
|
}
|
|
|
|
fetchLicense() {
|
|
LicenseFetcher.fetch()
|
|
.then((res) => {
|
|
this.actions.updateLicenses(res.licenses);
|
|
})
|
|
.catch((err) => {
|
|
console.log(err);
|
|
});
|
|
}
|
|
}
|
|
|
|
export default alt.createActions(LicenseActions);
|