refactor(api): clarify affected allocation resource ids

This commit is contained in:
2026-03-31 22:22:22 +02:00
parent dbf5401910
commit a9028290f2
@@ -268,12 +268,15 @@ export const allocationAssignmentProcedures = {
return updatedAllocation;
});
const affectedResourceIds = [existing.entry.resourceId, updated.resourceId].filter(
(resourceId): resourceId is string => Boolean(resourceId),
);
publishAllocationUpdated(ctx.db, {
id: updated.id,
projectId: updated.projectId,
resourceId: updated.resourceId,
resourceIds: [existing.entry.resourceId, updated.resourceId]
.filter((resourceId): resourceId is string => Boolean(resourceId)),
resourceIds: affectedResourceIds,
});
return updated;