summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bucky/app/bucky.js2
-rw-r--r--public/assets/js/lib/views/details/settings.js11
2 files changed, 5 insertions, 8 deletions
diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js
index c85ef45..940e02d 100644
--- a/bucky/app/bucky.js
+++ b/bucky/app/bucky.js
@@ -249,7 +249,7 @@ var bucky = module.exports = {
var promises = [ threadPromise ].concat(commentPromises).concat(filePromises)
Promise.all(promises).then( () => {
next()
- }).catch( () => {
+ }).catch( (err) => {
res.sendStatus(500)
})
},
diff --git a/public/assets/js/lib/views/details/settings.js b/public/assets/js/lib/views/details/settings.js
index a7dd050..565dfeb 100644
--- a/public/assets/js/lib/views/details/settings.js
+++ b/public/assets/js/lib/views/details/settings.js
@@ -226,10 +226,10 @@ var ThreadSettingsForm = FormView.extend({
url: "/api/thread/" + id,
headers: { "csrf-token": $("[name=_csrf]").attr("value") },
data: JSON.stringify({ csrf: csrf() }),
- dataType: "application/json",
+ dataType: "json",
success: function(){
window.location.href = "/"
- },
+ }
})
}
},
@@ -252,14 +252,11 @@ var ThreadSettingsForm = FormView.extend({
url: "/api/file/" + file_id,
headers: { "csrf-token": $("[name=_csrf]").attr("value") },
data: JSON.stringify({ csrf: csrf() }),
- dataType: "application/json",
+ dataType: "json",
success: function(data){
console.log(data)
$parent.remove()
- },
- error: function(data){
- $parent.remove()
- },
+ }
})
}
},