Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#80 Study Group API #95

Merged
merged 2 commits into from
Feb 28, 2017
Merged

#80 Study Group API #95

merged 2 commits into from
Feb 28, 2017

Conversation

pbgnz
Copy link
Contributor

@pbgnz pbgnz commented Feb 23, 2017

Description

This PR allows the front-end to:
1- create, get and delete study groups
2- allow users to join and/or leave study groups

Breakdown

StudyGroups

  • Created a new model for study groups
  • Created the GET, POST, DELETE endpoints for the study groups
  • Created the controller and routes for the study groups

User

  • Modified the user model and added a studyGroup field array
  • Created the controllers to handle the study groups

Testing

The endpoints were manually tested using postman (See comment below).
AVA tests will be completed in #66

@pbgnz pbgnz added this to the Sprint 3 milestone Feb 23, 2017
@pbgnz pbgnz self-assigned this Feb 23, 2017
@pbgnz
Copy link
Contributor Author

pbgnz commented Feb 23, 2017

The manual testing of the endpoints was done using POSTMAN.

Procedure:

StudyGroups

  • 1. Created a study group using the POST endpoint (Screenshot 1)
  • 2. Fetched that study group using GET by guid endpoint and verified contents were correct.
  • 3. Fetched all study groups using the GET end point and made sure the newly created group was in the list of all study groups (Screenshot 2)
  • 4. Deleted the newly created study group using the DELETE endpoint
  • 5. Fetched all study groups using the GET end point and made sure the created group in step 1 was properly deleted

User

  • 1. A user joins a study group by using the PUT /api/users/:cuid/studyGroup endpoint (Screenshot 3)
  • 2. Used the user GET endpoint to verify the study group was successfully added.
  • 3. Used the DELETE api/users/:cuid/studyGroup endpoint to delete the study group from the user list.
  • 4. Used the user GET endpoint to verify the study group was propoperly deleted.

Screenshot 1: create study group:

createstudygroup

Screenshot 2: get study groups:

getstudygroups

Screenshot 3: user joins study group:

adduserstudygroup

This was referenced Feb 26, 2017
Copy link
Owner

@jacobrs jacobrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me as a first backend implementation!

Copy link
Collaborator

@Philippe229 Philippe229 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pbgnz and I went over his code today. Looks good to me.

Copy link
Collaborator

@Philippe229 Philippe229 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Conflicts need to be resolved however

@pbgnz pbgnz merged commit 144072d into master Feb 28, 2017
@pbgnz pbgnz deleted the study_group_api branch February 28, 2017 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants