@vendit-dev/thirdparty-adapters 0.4.0-beta.7 → 0.4.0-beta.8

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.
@@ -84,7 +84,7 @@ var AmanoKoreaAdapter = /** @class */ (function () {
84
84
  this.getAccommodationAuthInfo = function (_a) {
85
85
  var accommodationId = _a.accommodationId;
86
86
  return __awaiter(_this, void 0, void 0, function () {
87
- var existingAuth, lockId, lockHash, parsedCredential_1, newAuth, parsedCredential, err_1;
87
+ var existingAuth, parsedCredential, lockId, lockHash, parsedCredential_1, newAuth, parsedCredential, err_1;
88
88
  return __generator(this, function (_b) {
89
89
  switch (_b.label) {
90
90
  case 0: return [4 /*yield*/, this.redis.get(AmanoKoreaAdapter.indexAccommodation({ accommodationId: accommodationId }))];
@@ -92,8 +92,11 @@ var AmanoKoreaAdapter = /** @class */ (function () {
92
92
  existingAuth = _b.sent();
93
93
  console.log('🚀 ~ file: amanoKorea.ts:113 ~ AmanoKoreaAdapter ~ existingAuth:', existingAuth);
94
94
  if (existingAuth) {
95
- if (existingAuth === 'NOT_FOUND') {
96
- return [2 /*return*/, false];
95
+ parsedCredential = this.parseJSONSafe(existingAuth);
96
+ console.log('🚀 ~ file: amanoKorea.ts:111 ~ AmanoKoreaAdapter ~ parsedCredential:', parsedCredential);
97
+ if (parsedCredential === null || parsedCredential === void 0 ? void 0 : parsedCredential.authorization) {
98
+ this.setAuthorization(parsedCredential.authorization);
99
+ this.API_HOST = parsedCredential.apiHost;
97
100
  }
98
101
  return [2 /*return*/, this.parseJSONSafe(existingAuth)];
99
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendit-dev/thirdparty-adapters",
3
- "version": "0.4.0-beta.7",
3
+ "version": "0.4.0-beta.8",
4
4
  "description": "Third party adapters between v-cloud and other PMS/CMS providers.",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {