mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 17:32:15 +03:00
275f623278
- Change fixture response of posts route to actual format. - Extracted classNames logic of routes into style-body mixin. - Additionally replaced all double-quotes with single-quotes for style conformance.
20 lines
464 B
JavaScript
20 lines
464 B
JavaScript
import ajax from 'ghost/utils/ajax';
|
|
import styleBody from 'ghost/mixins/style-body';
|
|
|
|
var PostsRoute = Ember.Route.extend(styleBody, {
|
|
classNames: ['manage'],
|
|
|
|
model: function () {
|
|
return ajax('/ghost/api/v0.1/posts').then(function (response) {
|
|
return response.posts;
|
|
});
|
|
},
|
|
|
|
actions: {
|
|
openEditor: function (post) {
|
|
this.transitionTo('editor', post);
|
|
}
|
|
}
|
|
});
|
|
|
|
export default PostsRoute; |