mirror of
https://github.com/OpenBankProject/API-Manager.git
synced 2026-02-06 14:16:46 +00:00
refactor/update consent deletion URL in views.py
This commit is contained in:
parent
62b1fd8cf9
commit
eeaf73529b
@ -49,10 +49,9 @@ class RevokeConsents(LoginRequiredMixin, View):
|
||||
"""Deletes consent from API"""
|
||||
api = API(self.request.session.get('obp'))
|
||||
try:
|
||||
urlpath = '/my/consent/current'
|
||||
consent_id= kwargs['consent_id']
|
||||
headers = {'Consent-Id': consent_id}
|
||||
response = api.delete(urlpath, settings.API_VERSION['v510'], headers=headers)
|
||||
urlpath = '/my/consents/{}'.format(consent_id)
|
||||
response = api.delete(urlpath, settings.API_VERSION['v510'])
|
||||
if 'code' in response and response['code'] >= 400:
|
||||
messages.error(self.request, response['message'])
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user