mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 21:49:37 -04:00
[WIP] Add call to api to update invitation to accepted.
When flow for invited user is complete, that is when user has been added to service, update invitation to accepted
This commit is contained in:
@@ -31,7 +31,7 @@ class InviteApiClient(BaseAPIClient):
|
||||
invited_users = self._get_invited_users(invites)
|
||||
return invited_users
|
||||
|
||||
def accept_invite(self, token):
|
||||
def check_token(self, token):
|
||||
resp = self.get(url='/invite/{}'.format(token))
|
||||
return InvitedUser(**resp['data'])
|
||||
|
||||
@@ -40,6 +40,11 @@ class InviteApiClient(BaseAPIClient):
|
||||
self.post(url='/service/{0}/invite/{1}'.format(service_id, invited_user_id),
|
||||
data=data)
|
||||
|
||||
def accept_invite(self, service_id, invited_user_id):
|
||||
data = {'status': 'accepted'}
|
||||
self.post(url='/service/{0}/invite/{1}'.format(service_id, invited_user_id),
|
||||
data=data)
|
||||
|
||||
def _get_invited_users(self, invites):
|
||||
invited_users = []
|
||||
for invite in invites:
|
||||
|
||||
Reference in New Issue
Block a user