Improved API responses

This commit is contained in:
rr-
2015-08-03 18:54:10 +02:00
parent 5a537ba168
commit b3def7fc21
49 changed files with 75 additions and 76 deletions

View File

@ -151,8 +151,9 @@ App.Presenters.PostEditPresenter = function(
promise.wait(api.post('/posts/' + post.id, formData))
.then(function(response) {
tagList.refreshTags();
post = response.json.post;
if (typeof(updateCallback) !== 'undefined') {
updateCallback(post = response.json);
updateCallback(post);
}
}).fail(function(response) {
showEditError(response);