Manos Chorianopoulos

fix getCoupons callback

...@@ -675,8 +675,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -675,8 +675,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
675 } 675 }
676 NSLog(@"Error at token %@", error ); 676 NSLog(@"Error at token %@", error );
677 }]; 677 }];
678 - } 678 + } else {
679 NSLog(@"Error at get Campaigns Personalized %@", error ); 679 NSLog(@"Error at get Campaigns Personalized %@", error );
680 + failure(error);
681 + }
680 } 682 }
681 }]; 683 }];
682 } 684 }
...@@ -1101,8 +1103,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1101,8 +1103,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1101 } 1103 }
1102 NSLog(@"Error at token %@", error ); 1104 NSLog(@"Error at token %@", error );
1103 }]; 1105 }];
1104 - } 1106 + } else {
1105 NSLog(@"Error at token %@", error ); 1107 NSLog(@"Error at token %@", error );
1108 + failure(error);
1109 + }
1106 } 1110 }
1107 }]; 1111 }];
1108 } 1112 }
...@@ -1155,8 +1159,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1155,8 +1159,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1155 } 1159 }
1156 NSLog(@"Error at token %@", error ); 1160 NSLog(@"Error at token %@", error );
1157 }]; 1161 }];
1158 - } 1162 + } else {
1159 NSLog(@"Error at token %@", error ); 1163 NSLog(@"Error at token %@", error );
1164 + failure(error);
1165 + }
1160 } 1166 }
1161 }]; 1167 }];
1162 } 1168 }
...@@ -1211,8 +1217,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1211,8 +1217,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1211 } 1217 }
1212 NSLog(@"Error at token %@", error ); 1218 NSLog(@"Error at token %@", error );
1213 // }]; 1219 // }];
1214 - } 1220 + } else {
1215 NSLog(@"Error at token %@", error ); 1221 NSLog(@"Error at token %@", error );
1222 + failure(error);
1223 + }
1216 } 1224 }
1217 }]; 1225 }];
1218 } 1226 }
...@@ -1249,8 +1257,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1249,8 +1257,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1249 } 1257 }
1250 NSLog(@"Error at token %@", error ); 1258 NSLog(@"Error at token %@", error );
1251 }]; 1259 }];
1252 - } 1260 + } else {
1253 NSLog(@"Error at change password %@", error ); 1261 NSLog(@"Error at change password %@", error );
1262 + failure(error);
1263 + }
1254 } 1264 }
1255 }]; 1265 }];
1256 } 1266 }
...@@ -1292,8 +1302,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1292,8 +1302,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1292 } 1302 }
1293 NSLog(@"Error at token %@", error ); 1303 NSLog(@"Error at token %@", error );
1294 }]; 1304 }];
1295 - } 1305 + } else {
1296 NSLog(@"Error at get profile %@", error ); 1306 NSLog(@"Error at get profile %@", error );
1307 + failure(error);
1308 + }
1297 } 1309 }
1298 }]; 1310 }];
1299 } 1311 }
...@@ -1353,8 +1365,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1353,8 +1365,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1353 } 1365 }
1354 NSLog(@"Error at token %@", error ); 1366 NSLog(@"Error at token %@", error );
1355 }]; 1367 }];
1356 - } 1368 + } else {
1357 NSLog(@"Error at post Event %@", error ); 1369 NSLog(@"Error at post Event %@", error );
1370 + failure(error);
1371 + }
1358 } 1372 }
1359 }]; 1373 }];
1360 } 1374 }
...@@ -1459,8 +1473,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1459,8 +1473,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1459 } 1473 }
1460 NSLog(@"Error at token %@", error ); 1474 NSLog(@"Error at token %@", error );
1461 }]; 1475 }];
1462 - } 1476 + } else {
1463 NSLog(@"Error at edit profile %@", error ); 1477 NSLog(@"Error at edit profile %@", error );
1478 + failure(error);
1479 + }
1464 } 1480 }
1465 }]; 1481 }];
1466 } 1482 }
...@@ -1500,8 +1516,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1500,8 +1516,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1500 } 1516 }
1501 NSLog(@"Error at token %@", error ); 1517 NSLog(@"Error at token %@", error );
1502 }]; 1518 }];
1503 - } 1519 + } else {
1504 NSLog(@"Error at get pacing details %@", error ); 1520 NSLog(@"Error at get pacing details %@", error );
1521 + failure(error);
1522 + }
1505 } 1523 }
1506 }]; 1524 }];
1507 } 1525 }
...@@ -1541,8 +1559,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1541,8 +1559,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1541 } 1559 }
1542 NSLog(@"Error at token %@", error ); 1560 NSLog(@"Error at token %@", error );
1543 }]; 1561 }];
1544 - } 1562 + } else {
1545 NSLog(@"Error at set pacing details %@", error ); 1563 NSLog(@"Error at set pacing details %@", error );
1564 + failure(error);
1565 + }
1546 } 1566 }
1547 }]; 1567 }];
1548 } 1568 }
...@@ -1619,8 +1639,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1619,8 +1639,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1619 } 1639 }
1620 NSLog(@"Error at token %@", error ); 1640 NSLog(@"Error at token %@", error );
1621 }]; 1641 }];
1622 - } 1642 + } else {
1623 NSLog(@"Error at consumer Integration %@", error ); 1643 NSLog(@"Error at consumer Integration %@", error );
1644 + failure(error);
1645 + }
1624 } 1646 }
1625 }]; 1647 }];
1626 } 1648 }
...@@ -1656,8 +1678,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1656,8 +1678,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1656 } 1678 }
1657 NSLog(@"Error at token %@", error ); 1679 NSLog(@"Error at token %@", error );
1658 }]; 1680 }];
1659 - } 1681 + } else {
1660 NSLog(@"Error at change profile image %@", error ); 1682 NSLog(@"Error at change profile image %@", error );
1683 + failure(error);
1684 + }
1661 } 1685 }
1662 }]; 1686 }];
1663 } 1687 }
...@@ -1693,8 +1717,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1693,8 +1717,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1693 } 1717 }
1694 NSLog(@"Error at token %@", error ); 1718 NSLog(@"Error at token %@", error );
1695 }]; 1719 }];
1696 - } 1720 + } else {
1697 NSLog(@"Error at add card %@", error ); 1721 NSLog(@"Error at add card %@", error );
1722 + failure(error);
1723 + }
1698 } 1724 }
1699 }]; 1725 }];
1700 } 1726 }
...@@ -1730,8 +1756,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1730,8 +1756,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1730 } 1756 }
1731 NSLog(@"Error at token %@", error ); 1757 NSLog(@"Error at token %@", error );
1732 }]; 1758 }];
1733 - } 1759 + } else {
1734 NSLog(@"Error at get cards %@", error ); 1760 NSLog(@"Error at get cards %@", error );
1761 + failure(error);
1762 + }
1735 } 1763 }
1736 }]; 1764 }];
1737 } 1765 }
...@@ -1767,8 +1795,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1767,8 +1795,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1767 } 1795 }
1768 NSLog(@"Error at token %@", error ); 1796 NSLog(@"Error at token %@", error );
1769 }]; 1797 }];
1770 - } 1798 + } else {
1771 NSLog(@"Error at get delete card %@", error ); 1799 NSLog(@"Error at get delete card %@", error );
1800 + failure(error);
1801 + }
1772 } 1802 }
1773 }]; 1803 }];
1774 } 1804 }
...@@ -1894,8 +1924,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1894,8 +1924,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1894 } 1924 }
1895 NSLog(@"Error at token %@", error ); 1925 NSLog(@"Error at token %@", error );
1896 }]; 1926 }];
1897 - } 1927 + } else {
1898 NSLog(@"Error at get coupons %@", error ); 1928 NSLog(@"Error at get coupons %@", error );
1929 + failure(error);
1930 + }
1899 } 1931 }
1900 }]; 1932 }];
1901 } 1933 }
...@@ -1931,8 +1963,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1931,8 +1963,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1931 } 1963 }
1932 NSLog(@"Error at token %@", error ); 1964 NSLog(@"Error at token %@", error );
1933 }]; 1965 }];
1934 - } 1966 + } else {
1935 NSLog(@"Error at get transaction history %@", error ); 1967 NSLog(@"Error at get transaction history %@", error );
1968 + failure(error);
1969 + }
1936 } 1970 }
1937 }]; 1971 }];
1938 } 1972 }
...@@ -1968,8 +2002,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -1968,8 +2002,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
1968 } 2002 }
1969 NSLog(@"Error at token %@", error ); 2003 NSLog(@"Error at token %@", error );
1970 }]; 2004 }];
1971 - } 2005 + } else {
1972 NSLog(@"Error at get points history %@", error ); 2006 NSLog(@"Error at get points history %@", error );
2007 + failure(error);
2008 + }
1973 } 2009 }
1974 }]; 2010 }];
1975 } 2011 }
...@@ -2009,8 +2045,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2009,8 +2045,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2009 } 2045 }
2010 NSLog(@"Error at token %@", error ); 2046 NSLog(@"Error at token %@", error );
2011 }]; 2047 }];
2012 - } 2048 + } else {
2013 NSLog(@"Error at get Sharing History %@", error ); 2049 NSLog(@"Error at get Sharing History %@", error );
2050 + failure(error);
2051 + }
2014 } 2052 }
2015 }]; 2053 }];
2016 } 2054 }
...@@ -2046,8 +2084,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2046,8 +2084,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2046 } 2084 }
2047 NSLog(@"Error at token %@", error ); 2085 NSLog(@"Error at token %@", error );
2048 }]; 2086 }];
2049 - } 2087 + } else {
2050 NSLog(@"Error at add address %@", error ); 2088 NSLog(@"Error at add address %@", error );
2089 + failure(error);
2090 + }
2051 } 2091 }
2052 }]; 2092 }];
2053 } 2093 }
...@@ -2083,8 +2123,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2083,8 +2123,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2083 } 2123 }
2084 NSLog(@"Error at token %@", error ); 2124 NSLog(@"Error at token %@", error );
2085 }]; 2125 }];
2086 - } 2126 + } else {
2087 NSLog(@"Error at get address %@", error ); 2127 NSLog(@"Error at get address %@", error );
2128 + failure(error);
2129 + }
2088 } 2130 }
2089 }]; 2131 }];
2090 } 2132 }
...@@ -2165,8 +2207,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2165,8 +2207,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2165 } 2207 }
2166 NSLog(@"Error at token %@", error ); 2208 NSLog(@"Error at token %@", error );
2167 }]; 2209 }];
2168 - } 2210 + } else {
2169 NSLog(@"Error at edit address %@", error ); 2211 NSLog(@"Error at edit address %@", error );
2212 + failure(error);
2213 + }
2170 } 2214 }
2171 }]; 2215 }];
2172 } 2216 }
...@@ -2202,8 +2246,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2202,8 +2246,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2202 } 2246 }
2203 NSLog(@"Error at token %@", error ); 2247 NSLog(@"Error at token %@", error );
2204 }]; 2248 }];
2205 - } 2249 + } else {
2206 NSLog(@"Error at delete address %@", error ); 2250 NSLog(@"Error at delete address %@", error );
2251 + failure(error);
2252 + }
2207 } 2253 }
2208 }]; 2254 }];
2209 } 2255 }
...@@ -2239,8 +2285,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2239,8 +2285,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2239 } 2285 }
2240 NSLog(@"Error at token %@", error ); 2286 NSLog(@"Error at token %@", error );
2241 }]; 2287 }];
2242 - } 2288 + } else {
2243 NSLog(@"Error at redeem coupons %@", error ); 2289 NSLog(@"Error at redeem coupons %@", error );
2290 + failure(error);
2291 + }
2244 } 2292 }
2245 }]; 2293 }];
2246 } 2294 }
...@@ -2499,8 +2547,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2499,8 +2547,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2499 } 2547 }
2500 NSLog(@"Error at token %@", error ); 2548 NSLog(@"Error at token %@", error );
2501 }]; 2549 }];
2502 - } 2550 + } else {
2503 NSLog(@"Error at redeem coupon sets %@", error ); 2551 NSLog(@"Error at redeem coupon sets %@", error );
2552 + failure(error);
2553 + }
2504 } 2554 }
2505 }]; 2555 }];
2506 } 2556 }
...@@ -2559,8 +2609,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2559,8 +2609,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2559 } 2609 }
2560 NSLog(@"Error at token %@", error ); 2610 NSLog(@"Error at token %@", error );
2561 }]; 2611 }];
2562 - } 2612 + } else {
2563 NSLog(@"Error at redeem coupon sets %@", error ); 2613 NSLog(@"Error at redeem coupon sets %@", error );
2614 + failure(error);
2615 + }
2564 } 2616 }
2565 }]; 2617 }];
2566 } 2618 }
...@@ -2600,8 +2652,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2600,8 +2652,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2600 } 2652 }
2601 NSLog(@"Error at token %@", error ); 2653 NSLog(@"Error at token %@", error );
2602 }]; 2654 }];
2603 - } 2655 + } else {
2604 NSLog(@"Error at cosmote Coupon Sharing %@", error ); 2656 NSLog(@"Error at cosmote Coupon Sharing %@", error );
2657 + failure(error);
2658 + }
2605 } 2659 }
2606 }]; 2660 }];
2607 } 2661 }
...@@ -2641,8 +2695,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2641,8 +2695,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2641 } 2695 }
2642 NSLog(@"Error at token %@", error ); 2696 NSLog(@"Error at token %@", error );
2643 }]; 2697 }];
2644 - } 2698 + } else {
2645 NSLog(@"Error at get cosmote sharing %@", error ); 2699 NSLog(@"Error at get cosmote sharing %@", error );
2700 + failure(error);
2701 + }
2646 } 2702 }
2647 }]; 2703 }];
2648 } 2704 }
...@@ -2682,8 +2738,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2682,8 +2738,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2682 } 2738 }
2683 NSLog(@"Error at token %@", error ); 2739 NSLog(@"Error at token %@", error );
2684 }]; 2740 }];
2685 - } 2741 + } else {
2686 NSLog(@"Error at cosmote retrieve sharing %@", error ); 2742 NSLog(@"Error at cosmote retrieve sharing %@", error );
2743 + failure(error);
2744 + }
2687 } 2745 }
2688 }]; 2746 }];
2689 } 2747 }
...@@ -2742,8 +2800,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2742,8 +2800,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2742 } 2800 }
2743 NSLog(@"Error at token %@", error ); 2801 NSLog(@"Error at token %@", error );
2744 }]; 2802 }];
2745 - } 2803 + } else {
2746 NSLog(@"Error at submit Order %@", error ); 2804 NSLog(@"Error at submit Order %@", error );
2805 + failure(error);
2806 + }
2747 } 2807 }
2748 }]; 2808 }];
2749 } 2809 }
...@@ -2779,8 +2839,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION) ...@@ -2779,8 +2839,10 @@ WL_VERSION_IMPLEMENTATION(WL_VERSION)
2779 } 2839 }
2780 NSLog(@"Error at token %@", error ); 2840 NSLog(@"Error at token %@", error );
2781 }]; 2841 }];
2782 - } 2842 + } else {
2783 NSLog(@"Error at get coupon sets %@", error ); 2843 NSLog(@"Error at get coupon sets %@", error );
2844 + failure(error);
2845 + }
2784 } 2846 }
2785 }]; 2847 }];
2786 } 2848 }
......
...@@ -690,6 +690,7 @@ public class swiftApi { ...@@ -690,6 +690,7 @@ public class swiftApi {
690 instanceOfMyApi.getCouponsWithSuccessBlock(couponsCallback, failureBlock: (couponsFailureCallback)) 690 instanceOfMyApi.getCouponsWithSuccessBlock(couponsCallback, failureBlock: (couponsFailureCallback))
691 } 691 }
692 } else { 692 } else {
693 + getCouponsCallback(nil)
693 } 694 }
694 } 695 }
695 696
......