You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to have proper schema validation for cases like making sure the Poll choices are UNIX timestamps, the intervals are neither too small nor large, etc. Going with joi might be a good idea.
The text was updated successfully, but these errors were encountered:
Using joi for validation at the 'request' level won't be necessary since mongoose' built-in validators take care of the types and most of the validation would be done on the client - which is the primary consumer of our API. For example: for choices, we could check if a choice is greater than the current Unix timestamp but that won't be necessary since the client would take care of that anyway.
Regarding intervals, the backend shouldn't have any constraints on the min & max intervals. There could be users who might want to have both 10 minute meets or 1 day hackathons. For the MVP, the client could let users choose a interval in a certain range like discussed here.
We need to have proper schema validation for cases like making sure the Poll choices are UNIX timestamps, the intervals are neither too small nor large, etc. Going with
joi
might be a good idea.The text was updated successfully, but these errors were encountered: