From d2e76933c2d81a7502d66baa926fd36420edad8a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 19 Dec 2017 01:45:01 +0100 Subject: fix hootbox for real --- public/assets/js/lib/views/index/hootbox.js | 4 ++-- public/assets/js/vendor/view/formview.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/assets/js/lib/views/index/hootbox.js b/public/assets/js/lib/views/index/hootbox.js index 2338153..89b5ef8 100644 --- a/public/assets/js/lib/views/index/hootbox.js +++ b/public/assets/js/lib/views/index/hootbox.js @@ -48,8 +48,8 @@ var HootBox = FormView.extend({ return errors.length ? errors : null }, - success: function(comment){ - this.prependComment(comment) + success: function(data){ + this.prependComment(data.comment) this.$("[name=comment]").val("") } }) \ No newline at end of file diff --git a/public/assets/js/vendor/view/formview.js b/public/assets/js/vendor/view/formview.js index ab3721b..97d16fe 100644 --- a/public/assets/js/vendor/view/formview.js +++ b/public/assets/js/vendor/view/formview.js @@ -128,6 +128,7 @@ var FormView = View.extend({ this.success(response) } }).catch(response => { + console.log(response) var errors = [] if (response.error) { if (response.error.errors && response.error.errors.length) { -- cgit v1.2.3-70-g09d2