Commit 3b122041 authored by Robert Knight's avatar Robert Knight

Fix leaving a group from the client

https://github.com/hypothesis/h/commit/46e4bbadc991d550ca9706b5237e35d68675a6cc
made a breaking change to the public API of the endpoint for removing
the current user from a group by renaming the "user" path parameter to
"userid".

Given that this change has been out for some time, I have opted to fix
the client rather than revert the change in the service.

Fixes #774
parent c9ec57cc
...@@ -169,7 +169,7 @@ function groups($rootScope, store, api, isSidebar, localStorage, serviceUrl, ses ...@@ -169,7 +169,7 @@ function groups($rootScope, store, api, isSidebar, localStorage, serviceUrl, ses
// by optimistically updating the session state // by optimistically updating the session state
return api.group.member.delete({ return api.group.member.delete({
pubid: id, pubid: id,
user: 'me', userid: 'me',
}); });
} }
......
...@@ -314,7 +314,7 @@ describe('groups', function() { ...@@ -314,7 +314,7 @@ describe('groups', function() {
return s.leave('id2').then(() => { return s.leave('id2').then(() => {
assert.calledWithMatch(fakeApi.group.member.delete, { assert.calledWithMatch(fakeApi.group.member.delete, {
pubid: 'id2', pubid: 'id2',
user: 'me', userid: 'me',
}); });
}); });
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment