0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fix unhandled rejected promises when using admin

closes #2707
- adjust call to api.settings.edit now that canThis is in use
This commit is contained in:
Jason Williams 2014-05-08 00:10:14 +00:00
parent bb543ede8e
commit 027169a1d1

View file

@ -144,10 +144,10 @@ function updateCheckRequest() {
function updateCheckResponse(response) {
var ops = [];
ops.push(api.settings.edit.call({user: 1}, 'nextUpdateCheck', response.next_check)
ops.push(api.settings.edit.call({internal: true}, 'nextUpdateCheck', response.next_check)
.otherwise(errors.rejectError));
ops.push(api.settings.edit.call({user: 1}, 'displayUpdateNotification', response.version)
ops.push(api.settings.edit.call({internal: true}, 'displayUpdateNotification', response.version)
.otherwise(errors.rejectError));
return when.settle(ops).then(function (descriptors) {