api change
This commit is contained in:
@@ -10,7 +10,7 @@ async function Clinic({ params: { slug } }) {
|
||||
);
|
||||
|
||||
const reqDoctors = await fetchReq(
|
||||
`${API_URL}/api/v1/doctors`
|
||||
`${API_URL}/api/v1/clinic/doctor-list/${slug}`
|
||||
);
|
||||
|
||||
const clinic = reqClinics;
|
||||
|
||||
@@ -8,7 +8,7 @@ export async function getClinicDoctors(slug, params = {}) {
|
||||
const query = new URLSearchParams(params).toString();
|
||||
const finalUrl = `${baseUrl}/api/v1/clinic/doctor-list/${slug}?${query}`;
|
||||
|
||||
console.log("🔗 Final API URL:", finalUrl);
|
||||
console.log("Final API URL:", finalUrl);
|
||||
|
||||
const response = await fetch(finalUrl, { method: "GET" });
|
||||
|
||||
@@ -23,7 +23,7 @@ export async function getClinicDoctors(slug, params = {}) {
|
||||
const doctorsList = json?.data || json || [];
|
||||
return Array.isArray(doctorsList) ? doctorsList : [];
|
||||
} catch (error) {
|
||||
console.error("❌ خطا در دریافت دکترهای کلینیک:", error);
|
||||
console.error("خطا در دریافت دکترهای کلینیک:", error);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user