updating format of text when creating logs for document uploads

This commit is contained in:
Khalim Conn-Kowlessar 2026-04-20 09:10:57 +00:00
parent 3a60a4bd91
commit 20e5eaff9a
2 changed files with 1 additions and 13 deletions

View file

@ -60,9 +60,6 @@ export async function POST(req: NextRequest) {
if (body.hubspotDealId) {
void syncContractorDocUploadToHubSpot({
hubspotDealId: body.hubspotDealId,
fileType: body.fileType ?? null,
measureName: body.measureName ?? null,
uploadedByEmail: session.user.email,
});
}

View file

@ -39,22 +39,13 @@ export async function syncRemovalRequestToHubSpot(params: {
export async function syncContractorDocUploadToHubSpot(params: {
hubspotDealId: string;
fileType: string | null;
measureName: string | null;
uploadedByEmail: string;
}): Promise<void> {
try {
const client = getHubSpotClient();
const log = [
`File type: ${params.fileType ?? "unclassified"}`,
`Measure: ${params.measureName ?? "N/A"}`,
`Uploaded by: ${params.uploadedByEmail}`,
].join("\n");
await client.crm.deals.basicApi.update(params.hubspotDealId, {
properties: {
contractor_document_upload_log: log,
contractor_document_upload_log: "Documents available - uploaded by contractor",
},
});
} catch (err) {