From d56452cd8c61cf463cd1bfbb5488dfc2f7387175 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 11 Dec 2017 10:08:34 +0100 Subject: edit comments --- public/assets/js/lib/views/details/editcomment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'public/assets/js/lib') diff --git a/public/assets/js/lib/views/details/editcomment.js b/public/assets/js/lib/views/details/editcomment.js index 1e1474f..a290ac4 100644 --- a/public/assets/js/lib/views/details/editcomment.js +++ b/public/assets/js/lib/views/details/editcomment.js @@ -7,6 +7,7 @@ var EditCommentForm = FormView.extend({ }, action: "", + method: 'put', initialize: function(){ this.__super__.initialize.call(this) @@ -17,7 +18,6 @@ var EditCommentForm = FormView.extend({ load: function(id){ this.action = "/api/comment/" + id $.get(this.action, function(data){ - console.log(data) this.$comment.val(data.comment.comment).focus() $("body").removeClass("loading") }.bind(this)) @@ -37,6 +37,6 @@ var EditCommentForm = FormView.extend({ }, success: function(data){ - window.location.href = "/details/" + data.comment.id + window.location.href = "/details/" + data.comment.thread } }) \ No newline at end of file -- cgit v1.2.3-70-g09d2