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

CRUD tecker to parent #125

Open
iuresti opened this issue Oct 18, 2019 · 0 comments
Open

CRUD tecker to parent #125

iuresti opened this issue Oct 18, 2019 · 0 comments

Comments

@iuresti
Copy link
Member

iuresti commented Oct 18, 2019

Create a table with 3 fields:

  • id UUID primary key
  • teckerId UUID references User
  • parentId UUID references User

Create endpoint PUT request to assign/update several teckers to 1 parent
PUT /api/parent/{parentId}
BODY
[
"teckerId1", "teckerId2"
]

Validations:

  • every child must have the role "TECKER"
  • parent must have the role "PARENT"
  • Under violation to some constraint endpoint will return a 409-Conflict and print in the logs the reason of the failure
  • Under success a 202 - Accepted must be returned
  • The list represent the complete list of children of the parent so any current assignment will be replaced.
  • The list can be empty meaning unassign all teckers to the parent

Create endpoint to GET teckers given a parent

  • GET /api/parent/{parentId}
    RETURN
    [
    {
    "teckerId":"userId",
    "name": "teckerName",
    "imageUrl": "teckerProfileImage"
    }
    ]

Create endpoint to GET teckers given a parent being current user

  • GET /api/parent/teckers
    RETURN
    [
    {
    "teckerId":"userId",
    "name": "teckerName",
    "imageUrl": "teckerProfileImage"
    }
    ]
@iuresti iuresti added this to the MVP milestone Oct 18, 2019
@k2rosvall k2rosvall assigned karenmtz3 and unassigned k2rosvall Oct 30, 2019
karenmtz3 added a commit that referenced this issue Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants