Commit 1a027448 by Dima Bart

Adjust sample app to support API changes in the SDK.

parent 6f4e73db
......@@ -79,7 +79,8 @@ class AccountViewController: UIViewController {
extension AccountViewController: AuthenticationDelegate {
func authenticationDidSucceedForCustomer(customer: BUYCustomer, withToken token: String) {
if let orders = self.storyboard?.instantiateViewControllerWithIdentifier("ordersViewController") {
if let orders = self.storyboard?.instantiateViewControllerWithIdentifier("ordersViewController") as? OrdersViewController {
orders.customer = customer
self.navigationController?.pushViewController(orders, animated: true)
}
}
......
......@@ -28,6 +28,8 @@ import UIKit
import Buy
class OrdersViewController: UIViewController {
var customer: BUYCustomer!
@IBOutlet private weak var tableView: UITableView!
......@@ -50,7 +52,7 @@ class OrdersViewController: UIViewController {
}
private func loadOrders() {
BUYClient.sharedClient.getOrdersForCustomerWithCallback { (orders, error) in
BUYClient.sharedClient.getOrdersForCustomerWithID(String(self.customer.identifier)) { (orders, error) in
if let orders = orders {
self.orders = orders
self.tableView.reloadData()
......
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