@vendit-dev/thirdparty-adapters 0.4.0-beta.6 → 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
|
-
|
|
96
|
-
|
|
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
|
}
|
|
@@ -109,6 +112,7 @@ var AmanoKoreaAdapter = /** @class */ (function () {
|
|
|
109
112
|
_b.trys.push([4, 9, 10, 12]);
|
|
110
113
|
if (existingAuth) {
|
|
111
114
|
parsedCredential_1 = this.parseJSONSafe(existingAuth);
|
|
115
|
+
console.log('🚀 ~ file: amanoKorea.ts:124 ~ AmanoKoreaAdapter ~ parsedCredential:', parsedCredential_1);
|
|
112
116
|
if (parsedCredential_1 === null || parsedCredential_1 === void 0 ? void 0 : parsedCredential_1.authorization) {
|
|
113
117
|
this.setAuthorization(parsedCredential_1.authorization);
|
|
114
118
|
this.API_HOST = parsedCredential_1.apiHost;
|
|
@@ -128,6 +132,7 @@ var AmanoKoreaAdapter = /** @class */ (function () {
|
|
|
128
132
|
return [2 /*return*/, false];
|
|
129
133
|
case 7:
|
|
130
134
|
parsedCredential = this.parseJSONSafe(newAuth.credential);
|
|
135
|
+
console.log('🚀 ~ file: amanoKorea.ts:151 ~ AmanoKoreaAdapter ~ parsedCredential:', parsedCredential);
|
|
131
136
|
if (parsedCredential === null || parsedCredential === void 0 ? void 0 : parsedCredential.authorization) {
|
|
132
137
|
this.setAuthorization(parsedCredential.authorization);
|
|
133
138
|
this.API_HOST = parsedCredential.apiHost;
|