Skip to content

add task solution#941

Open
timurradkevic wants to merge 1 commit into
mate-academy:masterfrom
timurradkevic:develop
Open

add task solution#941
timurradkevic wants to merge 1 commit into
mate-academy:masterfrom
timurradkevic:develop

Conversation

@timurradkevic
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants