-
Notifications
You must be signed in to change notification settings - Fork 155
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
base: main
Are you sure you want to change the base?
Develop #50
Conversation
There was a problem hiding this 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! ✨
export const loginUser = (email) => client.get(`/users`, { | ||
params: { email }, | ||
}); |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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.
There was a problem hiding this 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`, { |
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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.
DEMO LINK