Skip to content

add task implementation#1100

Open
ANDRIYTS1234 wants to merge 2 commits intomate-academy:masterfrom
ANDRIYTS1234:develop
Open

add task implementation#1100
ANDRIYTS1234 wants to merge 2 commits intomate-academy:masterfrom
ANDRIYTS1234:develop

Conversation

@ANDRIYTS1234
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

Great work on building the server! The overall structure is solid and handles the core logic well. However, I'm requesting a couple of changes that are necessary to pass the automated tests.

  1. Incorrect convertToCase function call: In src/createServer.js, the convertToCase function is being called as a method on an object. The task description shows it being used as a direct function call, like convertToCase(...). Please review how you are importing and using this function to match the required usage.
  2. Mismatched error messages: The error messages in your responses don't exactly match the text specified in the requirements. For instance, one message has a minor difference at the end of the string. Automated tests require an exact match, so please double-check and correct these messages.

Once these issues are fixed, your solution should be good to go. You're very close!


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

Important

Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.

Tip

If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.

Caution

Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.

Footnotes

  1. Rate AI review example

  2. Re-request AI review example

  3. Add AI review comments example

Comment on lines +33 to +36
message:
'This case is not supported.' +
' Available cases: SNAKE, KEBAB, CAMEL, PASCAL, UPPER.',
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This error message is slightly different from what's required. Please double-check the task description for the exact text – it seems there might be an extra character at the end of the string. Automated tests often rely on exact message matching.

res.statusMessage = 'OK';
res.setHeader('Content-Type', 'application/json');

const result = convertToCase.convertToCase(textToConvert, 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 way convertToCase is called here doesn't seem to match the example provided in the task description. The description shows convertToCase(...) being called as a direct function, not as a method on an object. You might need to adjust how you import or call this function.

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

Excellent work on the revisions! You've successfully addressed all the feedback from the previous review, and the server now fully meets the project requirements. The code is clean, handles both success and error cases correctly, and the logic for parsing the URL and validating inputs is solid. I am approving this submission. Great job!


✨ 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