fix inquiry message emails
All checks were successful
ci / docker_image (push) Successful in 3m12s
ci / deploy (push) Successful in 27s

This commit is contained in:
Drake Marino 2026-02-07 01:27:47 -06:00
parent 81f0113ce2
commit 09cdce350d
2 changed files with 2 additions and 2 deletions

View File

@ -90,6 +90,7 @@ export async function sendNewInquiryEmail(inquiryId: number) {
} }
export async function sendInquiryMessageEmail(inquiryId: number, sender: Sender) { export async function sendInquiryMessageEmail(inquiryId: number, sender: Sender) {
console.log(inquiryId);
const [item]: Item[] = await sql` const [item]: Item[] = await sql`
SELECT SELECT
i.*, i.*,

View File

@ -84,7 +84,6 @@ export const actions: Actions = {
const body = getRequiredFormString(data, 'message'); const body = getRequiredFormString(data, 'message');
console.log(inquiryId, sender, body);
const response = await sql` const response = await sql`
INSERT INTO inquiry_messages (thread_id, sender, body) INSERT INTO inquiry_messages (thread_id, sender, body)
VALUES (${inquiryId}, ${sender}, ${body}) VALUES (${inquiryId}, ${sender}, ${body})
@ -97,7 +96,7 @@ export const actions: Actions = {
} else { } else {
nextReplySender = Sender.FINDER; nextReplySender = Sender.FINDER;
} }
await sendInquiryMessageEmail(response[0].threadId, nextReplySender); await sendInquiryMessageEmail(inquiryId, nextReplySender);
return { success: true }; return { success: true };
} }