1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00
onion/js/actions/license_actions.js

26 lines
525 B
JavaScript
Raw Normal View History

2015-06-30 10:42:58 +02:00
'use strict';
import { alt } from '../alt';
2015-06-30 10:42:58 +02:00
import LicenseFetcher from '../fetchers/license_fetcher';
class LicenseActions {
constructor() {
this.generateActions(
'updateLicenses'
);
}
fetchLicense() {
LicenseFetcher.fetch()
.then((res) => {
this.actions.updateLicenses(res.licenses);
})
.catch((err) => {
2015-07-17 15:41:09 +02:00
console.logGlobal(err);
2015-06-30 10:42:58 +02:00
});
}
}
export default alt.createActions(LicenseActions);