Skip to content

Commit 9aaeec8

Browse files
committed
add back in data property
1 parent 4a8ae7f commit 9aaeec8

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

lambdas/api-handler/src/mappers/mi-mapper.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,17 @@ export function mapToPostMIResponse(mi: MIBase): PostMIResponse {
3737

3838
export function mapToGetMIResponse(mi: MIBase): GetMIResponse {
3939
return GetMIResponseResourceSchema.parse({
40-
id: mi.id,
41-
type: "ManagementInformation",
42-
attributes: {
43-
lineItem: mi.lineItem,
44-
timestamp: mi.timestamp,
45-
quantity: mi.quantity,
46-
specificationId: mi.specificationId,
47-
groupId: mi.groupId,
48-
stockRemaining: mi.stockRemaining,
40+
data: {
41+
id: mi.id,
42+
type: "ManagementInformation",
43+
attributes: {
44+
lineItem: mi.lineItem,
45+
timestamp: mi.timestamp,
46+
quantity: mi.quantity,
47+
specificationId: mi.specificationId,
48+
groupId: mi.groupId,
49+
stockRemaining: mi.stockRemaining,
50+
},
4951
},
5052
});
5153
}

0 commit comments

Comments
 (0)