-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
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"
}
]