2015-07-15 12:30:11 +08:00
|
|
|
import Store from 'flarum/Store';
|
|
|
|
import Forum from 'flarum/models/Forum';
|
|
|
|
import User from 'flarum/models/User';
|
|
|
|
import Discussion from 'flarum/models/Discussion';
|
|
|
|
import Post from 'flarum/models/Post';
|
|
|
|
import Group from 'flarum/models/Group';
|
|
|
|
import Activity from 'flarum/models/Activity';
|
|
|
|
import Notification from 'flarum/models/Notification';
|
2015-04-25 20:58:39 +08:00
|
|
|
|
2015-07-15 12:30:11 +08:00
|
|
|
/**
|
|
|
|
* The `store` initializer creates the application's data store and registers
|
2015-07-22 08:24:49 +08:00
|
|
|
* the default resource types to their models.
|
2015-07-15 12:30:11 +08:00
|
|
|
*
|
|
|
|
* @param {App} app
|
|
|
|
*/
|
|
|
|
export default function store(app) {
|
|
|
|
app.store = new Store({
|
2015-07-07 13:59:21 +08:00
|
|
|
forums: Forum,
|
|
|
|
users: User,
|
|
|
|
discussions: Discussion,
|
|
|
|
posts: Post,
|
|
|
|
groups: Group,
|
|
|
|
activity: Activity,
|
|
|
|
notifications: Notification
|
2015-07-15 12:30:11 +08:00
|
|
|
});
|
2015-07-07 13:59:21 +08:00
|
|
|
}
|