Update environment variables, add fingerprinting, and refactor API endpoints

- Changed server socket and REST API base URLs in .env file.
- Added FingerprintJS dependencies to package.json and package-lock.json.
- Implemented fingerprint generation in UserAuth component.
- Updated API endpoints from v1 to v2 in various service files.
- Refactored API calls to include authorization tokens.
- Commented out console log statements for cleaner production code.
This commit is contained in:
2025-05-26 17:58:46 +05:30
parent b99981a661
commit b76213f49f
22 changed files with 206 additions and 94 deletions

View File

@@ -2,17 +2,15 @@ let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_UR
export const signUpApi = async (
userName: string,
email: string,
password: Object,
Email: string,
Password: Object,
organization: Object
) => {
try {
const response = await fetch(`${url_Backend_dwinzo}/api/v1/signup`, {
const response = await fetch(`${url_Backend_dwinzo}/api/v2/Auth/signup`, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({ userName, email, password, organization }),
headers: { "Content-Type": "application/json", },
body: JSON.stringify({ userName, Email, Password, organization }),
});
if (!response.ok) {
@@ -20,7 +18,6 @@ export const signUpApi = async (
}
const result = await response.json();
console.log("result: ", result);
return result;
} catch (error) {
echo.error("Failed to sign-up");