refactor: list also include relation
This commit is contained in:
parent
438582054f
commit
399959f0b1
1 changed files with 12 additions and 2 deletions
|
|
@ -24,7 +24,12 @@ export class FlowTemplateController extends Controller {
|
|||
return await prisma.workflowTemplate.findMany({
|
||||
include: {
|
||||
step: {
|
||||
include: { value: true },
|
||||
include: {
|
||||
value: true,
|
||||
responsiblePerson: {
|
||||
include: { user: true },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
orderBy: { createdAt: "asc" },
|
||||
|
|
@ -38,7 +43,12 @@ export class FlowTemplateController extends Controller {
|
|||
return await prisma.workflowTemplate.findFirst({
|
||||
include: {
|
||||
step: {
|
||||
include: { value: true },
|
||||
include: {
|
||||
value: true,
|
||||
responsiblePerson: {
|
||||
include: { user: true },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
where: { id: templateId },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue