2015-06-05 11:06:36 +02:00
|
|
|
'use strict';
|
|
|
|
|
2015-10-06 16:47:59 +02:00
|
|
|
import { alt } from '../alt';
|
2015-06-03 11:49:39 +02:00
|
|
|
import UserActions from '../actions/user_actions';
|
2015-05-20 16:19:40 +02:00
|
|
|
|
2015-05-20 16:44:45 +02:00
|
|
|
|
2015-06-03 11:49:39 +02:00
|
|
|
class UserStore {
|
2015-05-20 16:19:40 +02:00
|
|
|
constructor() {
|
2015-06-01 18:59:47 +02:00
|
|
|
this.currentUser = {};
|
2015-06-03 11:49:39 +02:00
|
|
|
this.bindActions(UserActions);
|
2015-05-20 16:19:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
onUpdateCurrentUser(user) {
|
|
|
|
this.currentUser = user;
|
|
|
|
}
|
2015-06-20 16:43:18 +02:00
|
|
|
onDeleteCurrentUser() {
|
|
|
|
this.currentUser = {};
|
|
|
|
}
|
2015-06-01 18:59:47 +02:00
|
|
|
}
|
2015-05-20 16:19:40 +02:00
|
|
|
|
2015-06-15 08:44:44 +02:00
|
|
|
export default alt.createStore(UserStore, 'UserStore');
|