CFE-4 implementation of mock handler structure

This commit is contained in:
AmirHossein Mahmoodi
2023-10-18 15:23:21 +03:30
parent 490a34f22f
commit c6f8f9b84c
17 changed files with 252 additions and 216 deletions

View File

@@ -1,4 +1,4 @@
import {GET_USER_ROUTE} from "@/core/data/apiRoutes";
import {GET_USER} from "@/core/data/apiRoutes";
import axios from "axios";
import {createContext, useCallback, useEffect, useReducer} from "react";
import {errorRequest, errorResponse, errorSetting} from "@/core/utils/errorHandler";
@@ -71,7 +71,7 @@ export const UserProvider = ({children}) => {
(callback = () => {
}) => {
axios
.get(GET_USER_ROUTE, {
.get(GET_USER, {
headers: {authorization: `Bearer ${state.token}`},
})
.then(({data}) => {