@infrab4a/connect-angular 0.17.0-beta.7 → 0.17.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,7 @@
30
30
  var cookie__default = /*#__PURE__*/_interopDefaultLegacy(cookie);
31
31
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
32
32
 
33
- /******************************************************************************
33
+ /*! *****************************************************************************
34
34
  Copyright (c) Microsoft Corporation.
35
35
 
36
36
  Permission to use, copy, modify, and/or distribute this software for any
@@ -192,11 +192,7 @@
192
192
  var __createBinding = Object.create ? (function (o, m, k, k2) {
193
193
  if (k2 === undefined)
194
194
  k2 = k;
195
- var desc = Object.getOwnPropertyDescriptor(m, k);
196
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
197
- desc = { enumerable: true, get: function () { return m[k]; } };
198
- }
199
- Object.defineProperty(o, k2, desc);
195
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
200
196
  }) : (function (o, m, k, k2) {
201
197
  if (k2 === undefined)
202
198
  k2 = k;
@@ -350,11 +346,6 @@
350
346
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
351
347
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
352
348
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
353
- }
354
- function __classPrivateFieldIn(state, receiver) {
355
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
356
- throw new TypeError("Cannot use 'in' operator on non-object");
357
- return typeof state === "function" ? receiver === state : state.has(receiver);
358
349
  }
359
350
 
360
351
  var AuthService = /** @class */ (function () {
@@ -451,6 +442,7 @@
451
442
  }
452
443
  CouponService.prototype.checkCoupon = function (nickname, userEmail, checkoutType, plan, checkout, isSubscription) {
453
444
  var _this = this;
445
+ console.log('couponRecebido', nickname);
454
446
  return rxjs.from(this.couponRepository.find([
455
447
  {
456
448
  nickname: { operator: i2.Where.EQUALS, value: nickname },
@@ -458,6 +450,7 @@
458
450
  ])).pipe(operators.concatMap(function (coupons) { return _this.checkCouponRules(coupons, checkoutType, plan, checkout, isSubscription); }), operators.concatMap(function (coupon) { return _this.checkCouponUseAndLimit(coupon, userEmail); }), operators.map(function (coupon) { return _this.isValidCoupon(coupon, userEmail); }), operators.map(function (coupon) { return coupon; }));
459
451
  };
460
452
  CouponService.prototype.checkCouponRules = function (coupons, checkoutType, plan, checkout, isSubscription) {
453
+ console.log(coupons);
461
454
  // Caso não ache nenhum cupom, retorna erro
462
455
  if (coupons.count < 1) {
463
456
  console.log("Cupom inválido: not found");