refactor(api): clarify affected allocation resource ids
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user