Manos Chorianopoulos

refresh active coupons after activation

......@@ -59,6 +59,22 @@ import SwiftEventBus
let couponEvent = swiftApi.CouponEventModel()
SwiftEventBus.post("coupon_retrieved", sender: couponEvent)
swiftApi().getCouponsAsync(getCouponsCallback)
func getCouponsCallback (_ couponsData: Array<swiftApi.CouponItemModel>?) -> Void {
if (couponsData != nil) {
DispatchQueue.main.async {
print("========= getCouponsRequest SUCCESSSS CampaignVC =========")
print("========= getCouponsRequest count CampaignVC =========")
print(swiftApi().getCouponList().count)
}
} else {
print("========= getCouponsRequest ERROR CampaignVC =========")
}
}
} else if (eventArray[1] == "couponShared") {
}
......