Skip to content

Commit 4f8269e

Browse files
committed
minor post merge fixes and linting
1 parent b2657cf commit 4f8269e

4 files changed

Lines changed: 18 additions & 7 deletions

File tree

lambdas/supplier-allocator/src/config/__tests__/env.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe("lambdaEnv", () => {
1919
"lv1": {
2020
"supplierId": "supplier1",
2121
"specId": "spec1",
22-
"billingId": "billing1"
22+
"billingId": "billing1",
2323
"priority": 10
2424
}
2525
}`;

lambdas/supplier-allocator/src/handler/allocate-handler.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ import { Unit } from "aws-embedded-metrics";
88
import { MetricEntry, MetricStatus, buildEMFObject } from "@internal/helpers";
99
import { Deps } from "../config/deps";
1010

11-
type SupplierSpec = { supplierId: string; specId: string; priority: number; billingId: string };
11+
type SupplierSpec = {
12+
supplierId: string;
13+
specId: string;
14+
priority: number;
15+
billingId: string;
16+
};
1217
type PreparedEvents = LetterRequestPreparedEventV2 | LetterRequestPreparedEvent;
1318

1419
// small envelope that must exist in all inputs

lambdas/upsert-letter/src/handler/__tests__/upsert-handler.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,15 +217,17 @@ describe("createUpsertLetterHandler", () => {
217217
supplierId: "supplier1",
218218
specId: "spec1",
219219
billingId: "billing1",
220-
priority: 10 },
220+
priority: 10,
221+
},
221222
};
222223
const v1message = {
223224
letterEvent: createPreparedV1Event(),
224225
supplierSpec: {
225226
supplierId: "supplier2",
226227
specId: "spec2",
227228
billingId: "billing2",
228-
priority: 10 },
229+
priority: 10,
230+
},
229231
};
230232

231233
const evt: SQSEvent = createSQSEvent([
@@ -495,7 +497,8 @@ describe("createUpsertLetterHandler", () => {
495497
supplierId: "supplier1",
496498
specId: "spec1",
497499
billingId: "billing1",
498-
priority: 10 },
500+
priority: 10,
501+
},
499502
};
500503
const message2 = {
501504
letterEvent: createPreparedV2Event({
@@ -506,7 +509,8 @@ describe("createUpsertLetterHandler", () => {
506509
supplierId: "supplier1",
507510
specId: "spec1",
508511
billingId: "billing1",
509-
priority: 10 },
512+
priority: 10,
513+
},
510514
};
511515
const evt: SQSEvent = createSQSEvent([
512516
createSqsRecord("ok-msg", JSON.stringify(message1)),

lambdas/upsert-letter/src/handler/upsert-handler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ function getOperationFromType(type: string): UpsertOperation {
6565
preparedRequest,
6666
supplierSpec.supplierId,
6767
supplierSpec.specId,
68-
supplierSpec.specId, // use specId for now
68+
supplierSpec.specId, // use specId for now billingRef
69+
supplierSpec.billingId, // use billingId for specificationBillingId,
70+
supplierSpec.priority,
6971
);
7072
await deps.letterRepo.putLetter(letterToInsert);
7173

0 commit comments

Comments
 (0)