get orgs and services from user

this endpoint should probably only be used for the choose-service page
also create an OrganisationBrowsableItem to aid rendering of them
in the front-end.
This commit is contained in:
Leo Hemsted
2018-03-07 18:10:14 +00:00
parent 4edd990bc7
commit ee665caa7d
4 changed files with 19 additions and 2 deletions

View File

@@ -185,3 +185,7 @@ class UserApiClient(NotifyAdminAPIClient):
endpoint = '/user/{}/change-email-verification'.format(user_id)
data = {'email': new_email}
self.post(endpoint, data)
def get_organisations_and_services_for_user(self, user):
endpoint = '/user/{}/organisations-and-services'.format(user.id)
return self.get(endpoint)