Skip to content

Conversation

@YahyaAl-Ademi
Copy link

No description provided.

Copy link

@durw4rd durw4rd left a comment

Choose a reason for hiding this comment

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

Excellent work Yahia, more than what the instructions asked for! I appreciate that you pass back the response codes, verify the payload in your callback function.
There were a couple of small things, such as using boolean values instead of strings for true/false values, and consistent naming of the keys in the JSON object, but good job overall.

const { cityName } = req.body;
if (!cityName) {
return res.status(400).json({
success: "false",
Copy link

Choose a reason for hiding this comment

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

SUGGESTION: Use boolean true instead of string here.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks a lot for the helpful feedback! I’ll make sure to use booleans instead of strings.

});
}
res.status(200).json({
success: "true",
Copy link

Choose a reason for hiding this comment

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

SUGGESTION: Use boolean true instead of string here.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks a lot for the helpful feedback! I’ll make sure to use booleans instead of strings.

Comment on lines +21 to +22
Data: {
City: `You entered: ${cityName}`,
Copy link

Choose a reason for hiding this comment

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

SUGGESTION: Use lowercase 'data' and 'city' for consistency.

Copy link
Author

Choose a reason for hiding this comment

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

I will keep the JSON keys consistent next time. And I’ll keep improving on those details. thank you so much

@durw4rd durw4rd self-assigned this Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants