Skip to content

Commit b0e8ac6

Browse files
committed
more linting
1 parent 697e446 commit b0e8ac6

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

lambdas/api-handler/src/handlers/get-mi.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,31 @@ export default function createGetMIHandler(deps: Deps): APIGatewayProxyHandler {
4444
});
4545

4646
// metric with count 1 specifying the supplier
47-
const dimensions: Record<string, string> = { supplierId: supplierId };
47+
const dimensions: Record<string, string> = { supplierId };
4848
emitMetric("getMi", dimensions, deps.logger, MetricStatus.Success, 1);
4949

5050
// metric displaying the type/number of lineItems posted per supplier
5151
dimensions.lineItem = result.data.attributes.lineItem;
52-
emitMetric("getMi", dimensions, deps.logger, "LineItem per supplier", result.data.attributes.quantity);
52+
emitMetric(
53+
"getMi",
54+
dimensions,
55+
deps.logger,
56+
"LineItem per supplier",
57+
result.data.attributes.quantity,
58+
);
5359

5460
return {
5561
statusCode: 200,
5662
body: JSON.stringify(result, null, 2),
5763
};
5864
} catch (error) {
59-
emitMetric("getMi", { supplierId: supplierId }, deps.logger, MetricStatus.Failure, 1);
65+
emitMetric(
66+
"getMi",
67+
{ supplierId },
68+
deps.logger,
69+
MetricStatus.Failure,
70+
1,
71+
);
6072
return processError(error, commonIds.value.correlationId, deps.logger);
6173
}
6274
};

0 commit comments

Comments
 (0)