mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-08 12:09:43 +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.
32 lines
730 B
JavaScript
32 lines
730 B
JavaScript
/*global ic */
|
|
import postFixtures from 'ghost/fixtures/posts';
|
|
|
|
var post = function (id) {
|
|
return {
|
|
response: postFixtures.findBy('id', id),
|
|
jqXHR: {},
|
|
textStatus: 'success'
|
|
};
|
|
};
|
|
|
|
var posts = function () {
|
|
return {
|
|
response: {
|
|
'posts': postFixtures,
|
|
'page': 1,
|
|
'limit': 15,
|
|
'pages': 1,
|
|
'total': 2
|
|
},
|
|
jqXHR: {},
|
|
textStatus: 'success'
|
|
};
|
|
};
|
|
|
|
var defineFixtures = function () {
|
|
ic.ajax.defineFixture('/ghost/api/v0.1/posts', posts());
|
|
ic.ajax.defineFixture('/ghost/api/v0.1/posts/1', post(1));
|
|
ic.ajax.defineFixture('/ghost/api/v0.1/posts/2', post(2));
|
|
};
|
|
|
|
export default defineFixtures; |