diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2017-12-19 01:45:01 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2017-12-19 01:45:01 +0100 |
| commit | d2e76933c2d81a7502d66baa926fd36420edad8a (patch) | |
| tree | 4fc840f89e0bb3488f55c5936cacb9df615432a9 | |
| parent | dd4a6de8c883f83be1c39c4f2d431b828953a75e (diff) | |
fix hootbox for real
| -rw-r--r-- | public/assets/js/lib/views/index/hootbox.js | 4 | ||||
| -rw-r--r-- | 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) { |
