Fix /doctor/analysis/[id] expects id to be analysisResponse.id, not analysisOrder.id
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
getDoctorAccounts,
|
||||
getUserContactAdmin,
|
||||
} from '~/lib/services/account.service';
|
||||
import { getAnalysisResponseAdmin } from '~/lib/services/analysis-response.service';
|
||||
import {
|
||||
NotificationAction,
|
||||
createNotificationLog,
|
||||
@@ -345,10 +346,12 @@ class OrderWebhooksService {
|
||||
.map(({ email }) => email)
|
||||
.filter((email): email is string => !!email);
|
||||
|
||||
|
||||
const analysisResponse = await getAnalysisResponseAdmin(analysisOrder.id);
|
||||
await sendEmailFromTemplate(
|
||||
renderFirstResultsReceivedEmail,
|
||||
{
|
||||
analysisOrderId: analysisOrder.id,
|
||||
analysisResponseId: analysisResponse.id,
|
||||
language: 'et',
|
||||
},
|
||||
doctorEmails,
|
||||
@@ -380,10 +383,12 @@ class OrderWebhooksService {
|
||||
return;
|
||||
}
|
||||
|
||||
const analysisResponse = await getAnalysisResponseAdmin(analysisOrder.id);
|
||||
|
||||
await sendEmailFromTemplate(
|
||||
renderAllResultsReceivedEmail,
|
||||
{
|
||||
analysisOrderId: analysisOrder.id,
|
||||
analysisResponseId: analysisResponse.id,
|
||||
language: 'et',
|
||||
},
|
||||
assignedDoctorEmail,
|
||||
|
||||
Reference in New Issue
Block a user