Skip to content

Commit

Permalink
refactor: Update API URLs to use production environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Ramadan1 committed May 30, 2024
1 parent 3b386a3 commit b8924d8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/store/adminSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { createSlice, createAsyncThunk } from "@reduxjs/toolkit";
import axios from "axios";
import { cleareStatus } from "./authHandler";

const userUrl = "http://localhost:3000/api/v1/admin";
// const userUrl = "http://localhost:3000/api/v1/admin";

// const userUrl =
// "https://e-learning-backend-application.onrender.com/api/v1/admin";
const userUrl =
"https://e-learning-backend-application.onrender.com/api/v1/admin";

const initialState = {
loading: false,
Expand Down
8 changes: 4 additions & 4 deletions src/store/userSlice.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { toast } from "react-toastify";
import { cleareStatus } from "./authHandler";

//Bas URL
const authUrl = `http://localhost:3000/api/v1/auth`;
const userUrl = `http://localhost:3000/api/v1/users`;
// const authUrl = `http://localhost:3000/api/v1/auth`;
// const userUrl = `http://localhost:3000/api/v1/users`;

// const authUrl = `https://e-learning-backend-application.onrender.com/api/v1/auth`;
// const userUrl = `https://e-learning-backend-application.onrender.com/api/v1/users`;
const authUrl = `https://e-learning-backend-application.onrender.com/api/v1/auth`;
const userUrl = `https://e-learning-backend-application.onrender.com/api/v1/users`;

//SignUp new user to the application
export const signUp = createAsyncThunk(
Expand Down
2 changes: 1 addition & 1 deletion src/utils/customFetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ const productionUrl =
"https://e-learning-backend-application.onrender.com/api/v1";

export const customFetch = axios.create({
baseURL: devURL,
baseURL: productionUrl,
});

0 comments on commit b8924d8

Please sign in to comment.