Commit 47d7adaf by Brent Gulanowski

Update customer sample for API changes.

parent 9f95bd80
...@@ -65,7 +65,7 @@ class LoginViewController: UITableViewController { ...@@ -65,7 +65,7 @@ class LoginViewController: UITableViewController {
if let customer = customer, if let customer = customer,
let token = token { let token = token {
self.clear() self.clear()
self.delegate?.authenticationDidSucceedForCustomer(customer, withToken: token) self.delegate?.authenticationDidSucceedForCustomer(customer, withToken: token.accessToken)
} else { } else {
self.delegate?.authenticationDidFailWithError(error) self.delegate?.authenticationDidFailWithError(error)
} }
......
...@@ -52,7 +52,7 @@ class OrdersViewController: UIViewController { ...@@ -52,7 +52,7 @@ class OrdersViewController: UIViewController {
} }
private func loadOrders() { private func loadOrders() {
BUYClient.sharedClient.getOrdersForCustomerWithID(String(self.customer.identifier)) { (orders, error) in BUYClient.sharedClient.getOrdersForCustomerCallback { (orders, error) in
if let orders = orders { if let orders = orders {
self.orders = orders self.orders = orders
self.tableView.reloadData() self.tableView.reloadData()
......
...@@ -73,7 +73,7 @@ class SignupViewController: UITableViewController { ...@@ -73,7 +73,7 @@ class SignupViewController: UITableViewController {
if let customer = customer, if let customer = customer,
let token = token { let token = token {
self.clear() self.clear()
self.delegate?.authenticationDidSucceedForCustomer(customer, withToken: token) self.delegate?.authenticationDidSucceedForCustomer(customer, withToken: token.accessToken)
} else { } else {
self.delegate?.authenticationDidFailWithError(error) self.delegate?.authenticationDidFailWithError(error)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment