Skip to content

Latest commit

 

History

History
13 lines (12 loc) · 590 Bytes

File metadata and controls

13 lines (12 loc) · 590 Bytes

TODO: Add Input Validation and Error Handling to Backend Routes

Completed Tasks

  • Analyze existing code and gather information
  • Get user approval for plan
  • Install Joi
  • Create validation schemas in validators.js using Joi
  • Create a validation middleware
  • Update routes to use validation middleware
  • Update controllers to use try-catch and next(err)
  • Enhance error.middleware.js for better error handling
  • Update server.js to use enhanced error middleware
  • Test routes with invalid inputs (validation middleware handles invalid inputs)