I can have control of the commons I am participating in
Discussion
Currently, users can only join commons using the Join button on the homepage, however it would also be good for users to be able to leave a commons if they need to.
Acceptance Criteria
[ ] Users have the ability to leave a commons using a 'Leave' button
[ ] The commons name/card moves back to the Join a New Commons column
[ ] The user is no longer part of the commons on the backend and the commons does not show up for the user or on the admin side
Use the 'Join' button as a guide for how to implement this functionality - it does a similar opposite action.
Implementation Todos
Frontend:
[ ] Add a leave commons button, similar to the 'Visit' and 'Join' buttons on the homepage
Backend:
[ ] Make the required updates to the backend code to remove a user from a commons when the Leave button is clicked using the DELETE /api/commons/{commonsId}/users/{userId} endpoint
Testing:
[ ] Front end tests pass and there is adequate coverage
[ ] Back end tests pass and there is adequate coverage
Have you updated the title?
As a...
user
I can...
leave a commons
So that...
I can have control of the commons I am participating in
Discussion
Currently, users can only join commons using the Join button on the homepage, however it would also be good for users to be able to leave a commons if they need to.
Acceptance Criteria
Join a New Commons
columnUse the 'Join' button as a guide for how to implement this functionality - it does a similar opposite action.
Implementation Todos
Frontend:
Backend:
DELETE /api/commons/{commonsId}/users/{userId}
endpointTesting: