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

Develop #50

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

Conversation

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

It looks like there are a couple of critical issues that need to be addressed before we can proceed. There's a typo in the import path that could cause errors, and the loginUser function should use a POST request for authentication. Once these are fixed, your code will be in great shape! 😊 Keep up the good work!

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

Comment on lines +3 to +5
export const loginUser = (email) => client.get(`/users`, {
params: { email },
});

Choose a reason for hiding this comment

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

The loginUser function is using a GET request to retrieve user data based on email. Typically, login operations involve sending credentials via a POST request to authenticate the user. Consider using a POST request for login operations.

@@ -0,0 +1,6 @@
import { BASE_URL } from '@/constans';

Choose a reason for hiding this comment

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

There seems to be a typo in the import path. It should be '@/constants' instead of '@/constans'. This will likely cause an import error.

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.

Great job on setting up the project! 🎉 The HTML structure and API functions are well-implemented, and the configuration files are correctly set up. However, there are a couple of issues to address: there's a typo in the import path, and the loginUser function should use a POST request for secure login. Please review these comments to improve your code. Keep up the good work and continue learning from these experiences!

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

@@ -0,0 +1,7 @@
import { client } from "../utils/httpClient";

export const loginUser = (email) => client.get(`/users`, {

Choose a reason for hiding this comment

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

The loginUser function uses a GET request to retrieve user data. If the intention is to log in a user, consider using a POST request to send login credentials securely.

@@ -0,0 +1,6 @@
import { BASE_URL } from '@/constans';

Choose a reason for hiding this comment

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

There is a typo in the import path. It should be '@/constants' instead of '@/constans'. This will likely cause an import error.

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