contact recoreds done
This commit is contained in:
@ -10,6 +10,7 @@ export async function GET(request: NextRequest) {
|
||||
// Get query parameters
|
||||
const url = new URL(request.url);
|
||||
const customerId = url.searchParams.get('customerId');
|
||||
const contactType = url.searchParams.get('contactType');
|
||||
const dateFrom = url.searchParams.get('dateFrom');
|
||||
const dateTo = url.searchParams.get('dateTo');
|
||||
|
||||
@ -27,6 +28,11 @@ export async function GET(request: NextRequest) {
|
||||
whereClause.customerId = customerId;
|
||||
}
|
||||
|
||||
// Filter by contact type if provided
|
||||
if (contactType) {
|
||||
whereClause.contactType = contactType;
|
||||
}
|
||||
|
||||
// Filter by date range if provided
|
||||
if (dateFrom || dateTo) {
|
||||
whereClause.createdAt = {};
|
||||
|
||||
Reference in New Issue
Block a user