erp-backend
erp-backend copied to clipboard
[Feat]: [Add Validation for Paper]
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 Paper, 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.
Assign this to me