1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

api service and get profile

This commit is contained in:
Kyle Spearrin
2016-09-03 00:38:27 -04:00
parent 4c29b61189
commit 8fa3caaa3e
9 changed files with 141 additions and 33 deletions

View File

@@ -1,5 +1,6 @@
function UserService(tokenService) {
function UserService(tokenService, apiService) {
this.tokenService = tokenService;
this.apiService = apiService;
};
!function () {
@@ -43,10 +44,9 @@
loadProfile(profile, callback);
}
else if (!twoFactor && !profile) {
loadProfile({}, callback);
//apiService.accounts.getProfile({}, function (response) {
// loadProfile(response, callback);
//});
this.apiService.getProfile(function (response) {
loadProfile(response, callback);
});
}
});