Skip to content

add task solution#1132

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

add task solution#1132
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 handles all core requirements including URL parsing, validation, case conversion, and proper JSON responses with appropriate status codes. All five cases (SNAKE, KEBAB, CAMEL, PASCAL, UPPER) are supported with exact error messages as specified. The response contains all required fields - the only minor issue is that the field order is originalCase, convertedText, originalText, targetCase instead of the specified originalCase, targetCase, originalText, convertedText. Since JSON field ordering doesn't affect parsing and all functionality works correctly, this is a non-blocking cosmetic discrepancy. Consider reordering the fields in the response object to match the spec exactly if strict field ordering is required by your evaluator.


✨ 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 +64 to +69
res.end(
JSON.stringify({
...convertToCase(textToConvert, toCase),
originalText: textToConvert,
targetCase: toCase,
}),
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 response object structure produces fields in order: originalCase, convertedText, originalText, targetCase. However, based on the requirements example, the expected order is originalCase, targetCase, originalText, convertedText. Consider restructuring the response to explicitly include fields in the specified order rather than relying on spread operator.

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