api change

This commit is contained in:
Arezoo
2025-10-21 14:32:13 +03:30
parent 2cbf96ec6f
commit bfd797dd02
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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 [];
}
}