Skip to content

Commit

Permalink
Send DELETE without JSON
Browse files Browse the repository at this point in the history
    -because google
  • Loading branch information
mfraezz committed Aug 25, 2016
1 parent 5ac4c83 commit 7b94876
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions website/profile/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,7 @@ def personal_access_token_detail(auth, **kwargs):
@must_be_logged_in
def delete_external_identity(auth, **kwargs):
"""Removes single external identity from user"""
data = request.get_json()
identity = data.get('identity')
identity = kwargs.get('identity')
if not identity:
raise HTTPError(http.BAD_REQUEST)

Expand Down
2 changes: 1 addition & 1 deletion website/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ def make_url_map(app):
),

Rule(
'/profile/logins/',
'/profile/logins/<identity>/',
'delete',
profile_views.delete_external_identity,
json_renderer
Expand Down
2 changes: 1 addition & 1 deletion website/static/js/accountSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ var ExternalIdentityViewModel = oop.defclass({
'delete': '/api/v1/profile/logins/'
},
_removeIdentity: function(identity) {
var request = $osf.ajaxJSON('DELETE', this.urls.delete, {'data': {'identity': identity}});
var request = $osf.ajaxJSON('DELETE', this.urls.delete + identity + '/');
request.done(function() {
$osf.growl('Success', 'You have revoked this connected identity.', 'success');
window.location.reload();
Expand Down

0 comments on commit 7b94876

Please sign in to comment.