Skip to content

Commit e5c2a4e

Browse files
committed
validate_inventory: "true" in the right place
removed deadcode also. Verified this works and restores the error workflow (as call the /checkout will fail)
1 parent 9f7619a commit e5c2a4e

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

EmpowerPlant/CartViewController.swift

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,6 @@ class CartViewController: UIViewController, UITableViewDelegate, UITableViewData
8282
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
8383
request.httpMethod = "POST"
8484

85-
let json: [String: Any] = [
86-
"form": ["email":"[email protected]"], // TODO: email update + check if all tx's+errors have email
87-
"cart": [
88-
"total": 100,
89-
"quantities": ["4": 3],
90-
"items": [
91-
["id":"4", "title":"Plant Nodes"]
92-
// ["id":"5", "title":"Plant Stroller"]
93-
]
94-
],
95-
"validate_inventory": "true"
96-
]
97-
9885
let bodyData = try? JSONSerialization.data(
9986
withJSONObject: setJson(),
10087
options: []
@@ -156,6 +143,7 @@ class CartViewController: UIViewController, UITableViewDelegate, UITableViewData
156143
// ["id":"5", "title":"Plant Stroller"]
157144
]
158145
],
146+
"validate_inventory": "true"
159147
]
160148

161149
return json

0 commit comments

Comments
 (0)