feat: add metaFields to alerts

This commit is contained in:
2025-12-15 10:11:05 +05:30
parent e3f09cd4aa
commit 7dc3386847
7 changed files with 57 additions and 11 deletions

View File

@@ -278,7 +278,6 @@ export async function updatePermit(
{ ...input, lastUpdateDate: new Date() },
{ new: true }
)
.populate({ path: "county", select: "pid name avatar" })
.populate({ path: "assignedTo", select: "pid name avatar" })
.populate({ path: "createdBy", select: "pid name avatar" });
@@ -319,7 +318,11 @@ export async function updatePermit(
"user",
userId,
updatePermitResult.pid,
"permits"
"permits",
{
client: updatePermitResult.client.toString(),
county: updatePermitResult.county.id.toString(),
}
);
}
}
@@ -358,7 +361,11 @@ export async function updatePermit(
"user",
assignee,
updatePermitResult.pid,
"permits"
"permits",
{
client: updatePermitResult.client.toString(),
county: updatePermitResult.county.id.toString(),
}
);
}