When a post returns enqueued don't insert it in the stream and notify

- Includes removal of a lot of modal boilerplate
This commit is contained in:
Robin Ward
2015-04-09 18:33:37 -04:00
parent 76f7786d0d
commit 7f501a0c41
34 changed files with 172 additions and 125 deletions

View File

@ -88,6 +88,8 @@ export default function() {
return [200, {"Content-Type": "text/html"}, "<div class='page-not-found'>not found</div>"];
});
this.delete('/draft.json', success);
this.get('/draft.json', function() {
return response({});
});
@ -148,13 +150,17 @@ export default function() {
if (data.title === "this title triggers an error") {
return response(422, {errors: ['That title has already been taken']});
} else {
return response(200, {
success: true,
action: 'create_post',
post: {id: 12345, topic_id: 280, topic_slug: 'internationalization-localization'}
});
}
if (data.raw === "enqueue this content please") {
return response(200, { success: true, action: 'enqueued' });
}
return response(200, {
success: true,
action: 'create_post',
post: {id: 12345, topic_id: 280, topic_slug: 'internationalization-localization'}
});
});
this.get('/widgets/:widget_id', function(request) {