framework/js/lib/initializers/preload.js

10 lines
292 B
JavaScript
Raw Normal View History

2015-04-25 20:58:39 +08:00
export default function(app) {
app.store.pushPayload({data: app.preload.data});
app.forum = app.store.getById('forums', 1);
if (app.preload.session) {
app.session.token(app.preload.session.token);
app.session.user(app.store.getById('users', app.preload.session.userId));
}
}