Skip to content

solution#525

Open
aakash1sadhu wants to merge 1 commit intomate-academy:masterfrom
aakash1sadhu:develop
Open

solution#525
aakash1sadhu wants to merge 1 commit intomate-academy:masterfrom
aakash1sadhu:develop

Conversation

@aakash1sadhu
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 successfully fulfills all core requirements for the Users and Expenses APIs. All CRUD endpoints work correctly with proper HTTP status codes (200, 201, 204, 400, 404), validations, and Sequelize/PostgreSQL persistence. The only minor gap is that the task specifies Content-Type: application/json; charset=utf-8, but Express's res.json() sets Content-Type: application/json without the charset suffix. While this technically doesn't include the full header specified in the requirements, it doesn't break any functionality since the JSON responses are served correctly. Consider adding res.setHeader('Content-Type', 'application/json; charset=utf-8') in a middleware for strict compliance, but this is a minor improvement rather than a functional blocker. The extra Categories API doesn't interfere with the task.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Comment thread src/createServer.js
Comment on lines +16 to +17
app.use(cors());
app.use(express.json());
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The task requirement specifies setting the header Content-Type: application/json; charset=utf-8 on all responses. While res.json() sets Content-Type: application/json, it may not include the charset=utf-8 part. Consider adding a middleware to set this header globally.

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