JULIERAJ / KIDS-FIRST-Back

KIDS FIRST 2024 MVP Backend
0 stars 1 forks source link

hotfix feat/61/share-kid-service #67

Closed S-chahine closed 2 months ago

S-chahine commented 2 months ago

One Line Description Commented out parent role validation and made inviteeLastName field optional in the ShareKid model.

Description This pull request introduces two updates:

The parent role validation has been commented out to be applied in later versions. The inviteeLastName field in the ShareKid model is now optional, allowing users to share without providing a last name.

Requirements Parent Role Validation: The parent role validation is temporarily commented out and will be reintroduced in a future version. inviteeLastName Field: The inviteeLastName field is no longer required, providing flexibility in share requests where the last name is not provided.

Test Steps Prerequisites: Two user accounts, both already created and accessible. Make sure the lastname of the invitee is empty

Add Kid Endpoint: POST http://localhost:8000/api/v1/kids Body: json Copy code { "name": "Jamie", "childColor": "yellow" } Expected Response: Status 201 json { "newKid": { "name": "Jamie", "childColor": "yellow", "custodyIDs": [""], "_id": "", ... } } Create Share Request (with role: parent) Endpoint: POST http://localhost:8000/api/v1/kids//share-request Body: json Copy code { "inviteeEmail": "" } Expected Response: Status 201 json { "message": "Share request created successfully", "shareRequestId": "" }

Database Changes inviteeLastName Field: The inviteeLastName field is no longer required in the ShareKid model.

Checklist

AnnaSolovykh commented 2 months ago

Works well for me!

Screenshot 2024-08-18 at 11 29 11