diff --git a/src/alert/alert.schema.ts b/src/alert/alert.schema.ts index 11696bf..6e484c7 100644 --- a/src/alert/alert.schema.ts +++ b/src/alert/alert.schema.ts @@ -15,6 +15,7 @@ export const alertsModel = mongoose.model( client: { type: String, ref: "organization" }, county: { type: String, ref: "organization" }, permitType: String, + address: String, }, recipientType: { type: String, @@ -41,6 +42,7 @@ const alertResponse = z.object({ client: z.any().optional(), county: z.any().optional(), permitType: z.string().optional(), + address: z.string().optional(), }) .optional(), recipientType: z.enum(["user", "team"]), diff --git a/src/alert/alert.service.ts b/src/alert/alert.service.ts index 722285c..346333c 100644 --- a/src/alert/alert.service.ts +++ b/src/alert/alert.service.ts @@ -15,6 +15,7 @@ export async function createAlert( client?: String; county?: String; permitType?: String; + address?: String; } ) { const newAlert = await alertsModel.create({ diff --git a/src/payments/payments.service.ts b/src/payments/payments.service.ts index 7f8e6c2..036df9f 100644 --- a/src/payments/payments.service.ts +++ b/src/payments/payments.service.ts @@ -179,6 +179,7 @@ export async function updatePayment( { client: updatedPayment.client.toString(), county: updatedPayment.county.id.toString(), + address: updatedPayment.address.full_address, } ); } diff --git a/src/permit/permit.service.ts b/src/permit/permit.service.ts index 35e180a..503bc78 100644 --- a/src/permit/permit.service.ts +++ b/src/permit/permit.service.ts @@ -322,6 +322,7 @@ export async function updatePermit( { client: updatePermitResult.client.toString(), county: updatePermitResult.county.id.toString(), + address: updatePermitResult.address, } ); } @@ -365,6 +366,7 @@ export async function updatePermit( { client: updatePermitResult.client.toString(), county: updatePermitResult.county.id.toString(), + address: updatePermitResult.address.full_address, } ); } diff --git a/src/processed/processed.service.ts b/src/processed/processed.service.ts index 2b73333..c026c5a 100644 --- a/src/processed/processed.service.ts +++ b/src/processed/processed.service.ts @@ -117,6 +117,7 @@ export async function updateProcessed( { client: updateProcessedResult.client.toString(), county: updateProcessedResult.county.id.toString(), + address: updateProcessedResult.address.full_address, } ); }