-
-
Notifications
You must be signed in to change notification settings - Fork 40
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 Activity] #432
Comments
Hi there. This would actually be my first ever contribution. I'll go ahead as instructed on the readme if that's ok |
Aaand I just found the contribution guidelines and the instruction to not start working until being assigned the issue... 😳 I haven't actually touched anything. I've been doing the installations and setting up the environment. I'll wait for a green light to continue |
ah sorry for being late @churrundo . you can go ahead anytime, i have assigned this issue to you. thank you for taking interest in this project! |
Thanks! |
@churrundo the testcases for Activity might act up after you make your changes, so just like add data into your DB with the same IDs as in the testcase files through compass or atlas, wherever you code on, like so |
Perfect, thank you |
@churrundo I'd recommend you to sync your branch and have a look at the new middleware. I'm sure itll make this issue a lot easier to solve! |
Ok... So it just needs to count the amount of id's? |
effectively yeah @churrundo |
Lmao. That's so much simpler |
plz assign this issue to me |
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: