feat; add query string to include customer on get list
This commit is contained in:
parent
dcfa543479
commit
43b97be4f1
1 changed files with 2 additions and 0 deletions
|
|
@ -111,6 +111,7 @@ export class CustomerBranchController extends Controller {
|
|||
async list(
|
||||
@Query() zipCode?: string,
|
||||
@Query() customerId?: string,
|
||||
@Query() includeCustomer?: boolean,
|
||||
@Query() query: string = "",
|
||||
@Query() page: number = 1,
|
||||
@Query() pageSize: number = 30,
|
||||
|
|
@ -128,6 +129,7 @@ export class CustomerBranchController extends Controller {
|
|||
prisma.customerBranch.findMany({
|
||||
orderBy: { createdAt: "asc" },
|
||||
include: {
|
||||
customer: includeCustomer,
|
||||
province: true,
|
||||
district: true,
|
||||
subDistrict: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue