mirror of
https://github.com/yawaflua/SusMarket.git
synced 2025-12-10 04:29:32 +02:00
Code commenting & making code better
The same
This commit is contained in:
@@ -23,11 +23,7 @@ export default function LoginMenu({ toggleLoginMenu }: LoginMenuProps): JSX.Elem
|
||||
let response;
|
||||
if (isRegistering) {
|
||||
// Регистрация пользователя
|
||||
const params = new URLSearchParams({
|
||||
login: login,
|
||||
password: password
|
||||
});
|
||||
response = await axios.get(`http://127.0.0.1:8000/api/post/user?${params.toString()}`);
|
||||
response = await axios.get(`http://127.0.0.1:8000/api/post/user?login=${encodeURIComponent(login)}&password=${encodeURIComponent(password)}`);
|
||||
} else {
|
||||
// Вход в систему
|
||||
response = await axios.get(`http://127.0.0.1:8000/api/get/user?login=${encodeURIComponent(login)}&password=${encodeURIComponent(password)}`);
|
||||
|
||||
Reference in New Issue
Block a user