diff --git a/apimanager/consents/views.py b/apimanager/consents/views.py index 46e7b76..4699cbf 100644 --- a/apimanager/consents/views.py +++ b/apimanager/consents/views.py @@ -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: