responsive pagination && handle free_turn value && fix set value in small size appo list in page doctors && set data rate in doctor item && fix set token in cookie in page login on domain nobat724.com
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { removeToken } from "@/utils";
|
||||
import axios from "axios";
|
||||
import Cookies from "js-cookie";
|
||||
import "react-toastify/dist/ReactToastify.css";
|
||||
@@ -20,6 +21,10 @@ api.interceptors.response.use(
|
||||
return response.data;
|
||||
},
|
||||
(error) => {
|
||||
if (error.status === 401) {
|
||||
removeToken();
|
||||
window.location.pathname = "login";
|
||||
}
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -84,7 +84,10 @@ export const request = {
|
||||
getDoctorServices: () =>
|
||||
api.get("api/v1/categorys/doctor_services", removeTokenHead),
|
||||
postDoctorComment: (data) => api.post("api/v1/clinicpro/comment", data),
|
||||
getDoctorRate: (uuid) => api.get(`api/v1/clinicpro/rate/${uuid}`),
|
||||
postDoctorRate: (data) => api.post("api/v1/clinicpro/rate", data),
|
||||
patchDoctorRate: (data, uuid) =>
|
||||
api.patch(`api/v1/clinicpro/rate/${uuid}`, data),
|
||||
postCommentsLike: (data) => api.post("/api/v1/clinicpro/like", data),
|
||||
getClinicList: (params) =>
|
||||
api.get("/api/v1/clinics", {
|
||||
|
||||
Reference in New Issue
Block a user