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

[Feat]: [Add Validation for Coursework] #421

Open
TejasNair9977 opened this issue Oct 29, 2023 · 1 comment
Open

[Feat]: [Add Validation for Coursework] #421

TejasNair9977 opened this issue Oct 29, 2023 · 1 comment
Assignees
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

Comments

@TejasNair9977
Copy link
Member

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.

@TejasNair9977 TejasNair9977 added 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 hacktoberfest labels Oct 29, 2023
@TejasNair9977 TejasNair9977 added this to the Refinement milestone Oct 29, 2023
@Abhishekgoyal007
Copy link
Member

assign this to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: In Progress
Development

No branches or pull requests

2 participants