addapt switch to suscribe/unsuscribe notifications
This commit is contained in:
parent
a05d4a0cff
commit
d02afef341
3 changed files with 64 additions and 31 deletions
|
|
@ -7,6 +7,12 @@
|
|||
return $http.post('http://192.168.1.120:8000/subscribe', opts);
|
||||
}
|
||||
|
||||
root.unsubscribe = function(token) {
|
||||
return $http.post('http://192.168.1.120:8000/unsubscribe', {
|
||||
token: token
|
||||
});
|
||||
}
|
||||
|
||||
return root;
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -231,6 +231,14 @@ angular.module('copayApp.services')
|
|||
storage.get('addressbook-' + network, cb);
|
||||
};
|
||||
|
||||
root.setNotificationsOptions = function(opts, cb) {
|
||||
storage.set('notifications', opts, cb);
|
||||
}
|
||||
|
||||
root.getNotificationsOptions = function(cb) {
|
||||
storage.get('notifications', cb);
|
||||
}
|
||||
|
||||
root.removeAddressbook = function(network, cb) {
|
||||
storage.remove('addressbook-' + network, cb);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue