1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-28 06:03:40 +00:00

org settings and billing

This commit is contained in:
Kyle Spearrin
2017-04-06 16:52:25 -04:00
parent 7591843220
commit 80e4d2329a
8 changed files with 249 additions and 9 deletions

View File

@@ -35,6 +35,7 @@
_service.organizations = $resource(_apiUri + '/organizations/:id', {}, {
get: { method: 'GET', params: { id: '@id' } },
getBilling: { url: _apiUri + '/organizations/:id/billing', method: 'GET', params: { id: '@id' } },
list: { method: 'GET', params: {} },
post: { method: 'POST', params: {} },
put: { method: 'POST', params: { id: '@id' } },

View File

@@ -140,6 +140,17 @@ angular
});
};
_service.updateProfileOrganization = function (org) {
return _service.getUserProfile().then(function (profile) {
if (profile) {
if (profile.organizations && org.Id in profile.organizations) {
profile.organizations[org.Id].name = org.Name;
_userProfile = profile;
}
}
});
};
_service.isAuthenticated = function () {
return tokenService.getToken() !== null;
};