feat: include relation on response when update
This commit is contained in:
parent
627c6be1e0
commit
2d786ac32c
1 changed files with 20 additions and 0 deletions
|
|
@ -230,6 +230,26 @@ export class RequestListController extends Controller {
|
|||
@Body() payload: { attributes: Record<string, any> },
|
||||
) {
|
||||
const record = await prisma.requestWork.update({
|
||||
include: {
|
||||
request: {
|
||||
include: {
|
||||
quotation: true,
|
||||
employee: true,
|
||||
},
|
||||
},
|
||||
stepStatus: true,
|
||||
productService: {
|
||||
include: {
|
||||
service: true,
|
||||
work: true,
|
||||
product: {
|
||||
include: {
|
||||
document: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
where: { id: requestWorkId },
|
||||
data: { attributes: payload.attributes },
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue