mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-11 22:45:07 +00:00
20 lines
408 B
JavaScript
20 lines
408 B
JavaScript
'use strict';
|
|
|
|
define([
|
|
'reflux', 'app/actions/project', 'app/resources'
|
|
], function(Reflux, ProjectActions, resources) {
|
|
var Store = Reflux.createStore({
|
|
init: function() {
|
|
this.listenTo(ProjectActions.readAll, this.readAll);
|
|
},
|
|
readAll: function() {
|
|
var self = this;
|
|
resources.projects.sync('read', function(err, projects) {
|
|
self.trigger(projects);
|
|
});
|
|
}
|
|
});
|
|
|
|
return Store;
|
|
});
|