diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-10-29 18:26:12 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2017-11-21 15:55:05 +0100 |
commit | 072f88cddc66f83451bcb95f15cf356a6ba000bf (patch) | |
tree | 812f4d5180e194f64758f0a85c77ece71faf3c03 /js/services/addressBook_service.js | |
parent | fa00a18136d8a944e9e55c57fbcf137a391069e6 (diff) |
Fix http return and scope update
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'js/services/addressBook_service.js')
-rw-r--r-- | js/services/addressBook_service.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/services/addressBook_service.js b/js/services/addressBook_service.js index f021d6e6..a03424af 100644 --- a/js/services/addressBook_service.js +++ b/js/services/addressBook_service.js @@ -122,6 +122,7 @@ angular.module('contactsApp') dSet.appendChild(dProp); var oEnabled = xmlDoc.createElement('o:enabled'); + // Revert state to toggle oEnabled.textContent = !addressBook.enabled ? '1' : '0'; dProp.appendChild(oEnabled); @@ -131,7 +132,7 @@ angular.module('contactsApp') dav.request.basic({method: 'PROPPATCH', data: body}), addressBook.url ).then(function(response) { - if (response.status === 200) { + if (response.status === 207) { addressBook.enabled = !addressBook.enabled; } return addressBook; |