feat: add dynamic slug #40

Merged
kailasdevdas merged 1 commits from feat/dynamic-slug into dev 2026-05-25 06:57:42 +00:00
Showing only changes of commit 6d5e243e06 - Show all commits
+10 -1
View File
@@ -189,7 +189,15 @@ export const getDoctorsByDepartmentId = async (req, res) => {
doctor: {isActive: true}, doctor: {isActive: true},
}, },
include: { include: {
doctor: true, doctor: {
include: {
seo: {
select: {
slug: true,
},
},
},
},
}, },
orderBy: {sortOrder: "asc"}, orderBy: {sortOrder: "asc"},
}); });
@@ -200,6 +208,7 @@ export const getDoctorsByDepartmentId = async (req, res) => {
image: d.doctor.image ?? "", image: d.doctor.image ?? "",
designation: d.doctor.designation, designation: d.doctor.designation,
hierarchyOrder: d.sortOrder, hierarchyOrder: d.sortOrder,
slug: d.doctor.seo?.slug ?? "",
})); }));
res.status(200).json({ res.status(200).json({