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

Update Backend api call functions #16

Open
sailingsam opened this issue Aug 12, 2024 · 0 comments
Open

Update Backend api call functions #16

sailingsam opened this issue Aug 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sailingsam
Copy link
Owner

Issue Description

right now in some files I am directly calling API with fetch functions (use search feature in vs code for finding all those calls)

for eg. in SignupForm.jsx i have written a method

const response = await fetch(
        `${import.meta.env.VITE_BASE_URL_BACKEND}/api/users/register/otp/verify_otp`,
        {
          method: "POST",
          headers: {
            "Content-Type": "application/json",
          },
          body: JSON.stringify({ email, otp: otpentered }),
        }
      );

which is not good practice to call API requests,

Expected Behavior

Convert those all fetch requests to proper method using Axios instead of fetch methods and place them inside BackendCalls folder.

for Reference: see files inside backendCalls/auth folder

Additional Information

If yu have doubt please ask and then only work.

@sailingsam sailingsam added the bug Something isn't working label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant