Skip to content

Commit

Permalink
validate_inventory: "true" in the right place
Browse files Browse the repository at this point in the history
removed deadcode also. Verified this works and restores the error workflow (as call the /checkout will fail)
  • Loading branch information
ndmanvar committed Sep 27, 2024
1 parent 9f7619a commit e5c2a4e
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions EmpowerPlant/CartViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,6 @@ class CartViewController: UIViewController, UITableViewDelegate, UITableViewData
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpMethod = "POST"

let json: [String: Any] = [
"form": ["email":"[email protected]"], // TODO: email update + check if all tx's+errors have email
"cart": [
"total": 100,
"quantities": ["4": 3],
"items": [
["id":"4", "title":"Plant Nodes"]
// ["id":"5", "title":"Plant Stroller"]
]
],
"validate_inventory": "true"
]

let bodyData = try? JSONSerialization.data(
withJSONObject: setJson(),
options: []
Expand Down Expand Up @@ -156,6 +143,7 @@ class CartViewController: UIViewController, UITableViewDelegate, UITableViewData
// ["id":"5", "title":"Plant Stroller"]
]
],
"validate_inventory": "true"
]

return json
Expand Down

0 comments on commit e5c2a4e

Please sign in to comment.