From 36076ce90d7c04064b84e8d2fd7c5d5c90ff031e Mon Sep 17 00:00:00 2001 From: lorentz Date: Mon, 13 Apr 2026 18:20:07 +0000 Subject: [PATCH] Add carrierName/writingCompanyName to tasks GET and PATCH API responses --- ondeck/src/app/api/tasks/[id]/route.ts | 4 ++-- ondeck/src/app/api/tasks/route.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ondeck/src/app/api/tasks/[id]/route.ts b/ondeck/src/app/api/tasks/[id]/route.ts index 68cf99e..a7ecadc 100644 --- a/ondeck/src/app/api/tasks/[id]/route.ts +++ b/ondeck/src/app/api/tasks/[id]/route.ts @@ -90,7 +90,7 @@ export async function PATCH( data: updateData, include: { client: { select: { id: true, name: true } }, - policy: { select: { id: true, policyNumber: true, policyType: true, expirationDate: true } }, + policy: { select: { id: true, policyNumber: true, policyType: true, expirationDate: true, carrierName: true, writingCompanyName: true } }, policyGroup: { select: { id: true, name: true, renewalDate: true } }, assignments: { include: { user: { select: { id: true, displayName: true, email: true } } } }, }, @@ -109,7 +109,7 @@ export async function PATCH( where: { id }, include: { client: { select: { id: true, name: true } }, - policy: { select: { id: true, policyNumber: true, policyType: true, expirationDate: true } }, + policy: { select: { id: true, policyNumber: true, policyType: true, expirationDate: true, carrierName: true, writingCompanyName: true } }, policyGroup: { select: { id: true, name: true, renewalDate: true } }, assignments: { include: { user: { select: { id: true, displayName: true, email: true } } } }, }, diff --git a/ondeck/src/app/api/tasks/route.ts b/ondeck/src/app/api/tasks/route.ts index 56dd5b2..e3a6403 100644 --- a/ondeck/src/app/api/tasks/route.ts +++ b/ondeck/src/app/api/tasks/route.ts @@ -101,6 +101,8 @@ export async function GET(request: NextRequest) { policyNumber: true, policyType: true, expirationDate: true, + carrierName: true, + writingCompanyName: true, }, }, policyGroup: {