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

@ -53,7 +53,7 @@ App.Presenters.CommentListPresenter = function(
if (comments.length === 0) {
promise.wait(api.get('/comments/' + params.post.id))
.then(function(response) {
comments = response.json.data;
comments = response.json.comments;
render();
}).fail(function() {
console.log(arguments);
@ -176,7 +176,7 @@ App.Presenters.CommentListPresenter = function(
p.then(function(response) {
$textarea.val('');
var comment = response.json;
var comment = response.json.comment;
if (commentToEdit) {
$form.slideUp(function() {