1
0
mirror of https://github.com/ascribe/onion.git synced 2025-02-14 21:10:27 +01:00
onion/js/actions/pagination_actions.js

24 lines
524 B
JavaScript

import alt from '../alt';
import PieceListFetcher from '../fetchers/piece_list_fetcher';
class UserActions {
constructor() {
this.generateActions(
'updateCurrentUser'
);
}
fetchCurrentUser() {
UserFetcher.fetchOne()
.then((res) => {
this.actions.updateCurrentUser(res['users'][0]);
})
.catch((err) => {
console.log(err);
});
}
};
export default alt.createActions(UserActions);