Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution #54

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Solution #54

wants to merge 14 commits into from

Conversation

iyehorova
Copy link

Copy link

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

Your code is well-structured and meets the task requirements effectively! 🎉 While there are some considerations regarding the Content-Type headers, these are minor and do not impact the core functionality of your application. It's great to see your attention to detail in API interactions. Keep up the excellent work, and consider verifying the API requirements for content types to ensure optimal performance. Happy coding! 🚀

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

Comment on lines +10 to +12
const response = await client.post('/comments', commentData, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'

Choose a reason for hiding this comment

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

The Content-Type header is set to application/x-www-form-urlencoded. Ensure that this is the required format for your API. If the API expects JSON, you should use application/json instead.

Comment on lines +20 to +22
const response = await client.delete(`/comments/${commentId}`, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'

Choose a reason for hiding this comment

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

Similar to the POST request, verify if the DELETE request requires the Content-Type header to be application/x-www-form-urlencoded. Typically, DELETE requests do not need a body, so this header might be unnecessary.

Comment on lines +14 to +15
headers: {
'Content-Type': 'application/x-www-form-urlencoded'

Choose a reason for hiding this comment

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

The Content-Type header is set to application/x-www-form-urlencoded. Ensure this is the required format for your API. If the API expects JSON, you should use application/json instead.

Comment on lines +26 to +27
headers: {
'Content-Type': 'application/x-www-form-urlencoded'

Choose a reason for hiding this comment

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

The Content-Type header is set to application/x-www-form-urlencoded. Verify if this is necessary for PATCH requests. JSON is typically used for sending data in PATCH requests.

Comment on lines +36 to +37
headers: {
'Content-Type': 'application/x-www-form-urlencoded'

Choose a reason for hiding this comment

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

The Content-Type header is set to application/x-www-form-urlencoded. DELETE requests usually do not require a body, so this header might be unnecessary. Verify the API requirements.

export const addUser = async (userData) => {
const response = await client.post('/users', {
name: userData.name,
username: userData.name,

Choose a reason for hiding this comment

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

The username field is assigned the value of userData.name. If this is intentional, ensure that name and username are supposed to be the same. Otherwise, consider using userData.username.

Comment on lines +18 to +19
headers: {
'Content-Type': 'application/x-www-form-urlencoded'

Choose a reason for hiding this comment

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

The Content-Type header is set to application/x-www-form-urlencoded. Ensure this is the required format for your API. If the API expects JSON, you should use application/json instead.

Comment on lines +30 to +31
headers: {
'Content-Type': 'application/x-www-form-urlencoded'

Choose a reason for hiding this comment

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

The Content-Type header is set to application/x-www-form-urlencoded. Verify if this is necessary for PATCH requests. JSON is typically used for sending data in PATCH requests.

Comment on lines +40 to +41
headers: {
'Content-Type': 'application/x-www-form-urlencoded'

Choose a reason for hiding this comment

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

The Content-Type header is set to application/x-www-form-urlencoded. DELETE requests usually do not require a body, so this header might be unnecessary. Verify the API requirements.

Copy link

@igorkruz igorkruz left a comment

Choose a reason for hiding this comment

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

Good Job 👍
let's improve your solution

src/components/CommentBlock.vue Outdated Show resolved Hide resolved
src/components/CommentBlock.vue Outdated Show resolved Hide resolved
src/components/FormBlock.vue Outdated Show resolved Hide resolved
@iyehorova iyehorova requested a review from igorkruz November 19, 2024 20:35
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.

4 participants