Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lambdas/supplier-allocator/src/handler/allocation-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,16 @@ export async function preferredSupplierPack(
packSpecificationIds: string[],
deps: Deps,
): Promise<PackSpecification> {
// Constraints
const eligiblePacks: string[] = await filterPacksForLetter(
letterEvent,
packSpecificationIds,
deps,
);

// No eligible packs -> REJECTED

// Check can a supplier fulfil the pack
const preferredSupplierPacks: SupplierPack[] =
await getPreferredSupplierPacks(eligiblePacks, suppliers, deps);
const preferredPack: PackSpecification = await getPackSpecification(
Expand Down
4 changes: 4 additions & 0 deletions lambdas/upsert-letter/src/handler/upsert-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
eventId: preparedRequest.id,
letterId: letterToInsert.id,
supplierId: letterToInsert.supplierId,
letterInsertRequest: request,
letterToInsert: letterToInsert,

Check failure on line 60 in lambdas/upsert-letter/src/handler/upsert-handler.ts

View workflow job for this annotation

GitHub Actions / Test stage / Linting

Expected property shorthand
});
// emit success metric
emitIndividualMetric(
Expand Down Expand Up @@ -99,6 +101,8 @@
eventId: supplierEvent.id,
letterId: letterToUpdate.id,
supplierId: letterToUpdate.supplierId,
letterUpdateRequest: request,
letterToUpdate: letterToUpdate,

Check failure on line 105 in lambdas/upsert-letter/src/handler/upsert-handler.ts

View workflow job for this annotation

GitHub Actions / Test stage / Linting

Expected property shorthand
});
emitIndividualMetric(
deps.logger,
Expand Down
Loading