1
0
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:
Kyle Spearrin
2017-01-14 12:47:11 -05:00
parent c18cdd6206
commit bb56f9ee47
4 changed files with 63 additions and 13 deletions

View File

@@ -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) {