Showing
1 changed file
with
16 additions
and
0 deletions
... | @@ -58,6 +58,22 @@ import SwiftEventBus | ... | @@ -58,6 +58,22 @@ import SwiftEventBus |
58 | } else if (eventArray[1] == "couponRetrieved") { | 58 | } else if (eventArray[1] == "couponRetrieved") { |
59 | let couponEvent = swiftApi.CouponEventModel() | 59 | let couponEvent = swiftApi.CouponEventModel() |
60 | SwiftEventBus.post("coupon_retrieved", sender: couponEvent) | 60 | SwiftEventBus.post("coupon_retrieved", sender: couponEvent) |
61 | + | ||
62 | + swiftApi().getCouponsAsync(getCouponsCallback) | ||
63 | + | ||
64 | + func getCouponsCallback (_ couponsData: Array<swiftApi.CouponItemModel>?) -> Void { | ||
65 | + if (couponsData != nil) { | ||
66 | + | ||
67 | + DispatchQueue.main.async { | ||
68 | + print("========= getCouponsRequest SUCCESSSS CampaignVC =========") | ||
69 | + | ||
70 | + print("========= getCouponsRequest count CampaignVC =========") | ||
71 | + print(swiftApi().getCouponList().count) | ||
72 | + } | ||
73 | + } else { | ||
74 | + print("========= getCouponsRequest ERROR CampaignVC =========") | ||
75 | + } | ||
76 | + } | ||
61 | 77 | ||
62 | } else if (eventArray[1] == "couponShared") { | 78 | } else if (eventArray[1] == "couponShared") { |
63 | 79 | ... | ... |
-
Please register or login to post a comment