feat: include relation

This commit is contained in:
Methapon2001 2024-07-02 09:27:05 +07:00
parent 9a824f3ddf
commit 5e8dd1ddad

View file

@ -732,6 +732,9 @@ export class EmployeeController extends Controller {
@Get("{employeeId}/edit-history")
async editHistory(@Path() employeeId: string) {
return await prisma.employeeHistory.findMany({
include: {
updatedBy: true,
},
where: { masterId: employeeId },
});
}