mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
poll new revision date instead of full sync each time
This commit is contained in:
@@ -46,6 +46,23 @@ function initApiService() {
|
||||
|
||||
// Account APIs
|
||||
|
||||
ApiService.prototype.getAccountRevisionDate = function (success, error) {
|
||||
var self = this;
|
||||
this.tokenService.getToken(function (token) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: self.baseUrl + '/accounts/revision-date?access_token=' + token,
|
||||
dataType: 'json',
|
||||
success: function (response) {
|
||||
success(response);
|
||||
},
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
handleError(error, jqXHR, textStatus, errorThrown);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
ApiService.prototype.getProfile = function (success, error) {
|
||||
var self = this;
|
||||
this.tokenService.getToken(function (token) {
|
||||
|
||||
Reference in New Issue
Block a user