[Feat]: [Add Validation for Coursework] #421
Labels
enhancement
New feature or request
good first issue
Good for newcomers
Issue Size: 3
Something that has reference but needs a lot of change
Priority: High
Needs to be done ASAP
Milestone
Description
There needs to be validation for all IDs in here. The validation must be done in the controller. You need to provide the service with a proper filter so that it can check if the ID provided in
req.body
actually exists for each collection that it belongs to. For example,In
req.body
for adding Activity, it needs to check that the provided IDs actually exist in the database. As always, never trust that the user is providing valid data.Use Case
It will make sure that data given by the user to the database is valid.
Proposed Solution
Right before the function that creates the document, check if the IDs provided by the user is valid.
The text was updated successfully, but these errors were encountered: