mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
25 lines
563 B
JavaScript
25 lines
563 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: postFixtures,
|
||
|
jqXHR: {},
|
||
|
textStatus: 'success'
|
||
|
};
|
||
|
};
|
||
|
|
||
|
export default 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));
|
||
|
}
|