add task solution#941
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your implementation correctly satisfies all task requirements. Both collections (Users and Expenses) have exactly 5 endpoints each with proper in-memory storage using closure-scoped arrays. The data behavior is exactly as specified: empty on server start, persists during runtime, and clears after restart. All required error handling (404 for non-existent entities, 400 for missing parameters) is implemented in the controllers, and the createServer function properly returns the Express app without calling listen(). A few minor improvements you may consider for future submissions: - The fullUpdateById and partUpdateById methods in expenses.service.js could validate user existence (similar to the create method) to prevent orphaned expense records - Consider adding validation for edge cases with empty string date parameters in query filtering - For consistency with the expenses controller (which has separate fullUpdate and partUpdate methods), you might separate the PUT and PATCH logic in the users controller. These are not blockers—your code is functionally complete and meets all explicit requirements from the task. Great work on the proper separation of concerns with services, controllers, and routers!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.