@vendit-dev/thirdparty-adapters 0.4.0-beta.7 → 0.4.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.
- package/lib/adapters/amanoKorea.js +14 -5
- package/package.json +1 -1
|
@@ -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,13 @@ 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({
|
|
99
|
+
authorization: parsedCredential.authorization,
|
|
100
|
+
});
|
|
101
|
+
this.API_HOST = parsedCredential.apiHost;
|
|
97
102
|
}
|
|
98
103
|
return [2 /*return*/, this.parseJSONSafe(existingAuth)];
|
|
99
104
|
}
|
|
@@ -111,7 +116,9 @@ var AmanoKoreaAdapter = /** @class */ (function () {
|
|
|
111
116
|
parsedCredential_1 = this.parseJSONSafe(existingAuth);
|
|
112
117
|
console.log('🚀 ~ file: amanoKorea.ts:124 ~ AmanoKoreaAdapter ~ parsedCredential:', parsedCredential_1);
|
|
113
118
|
if (parsedCredential_1 === null || parsedCredential_1 === void 0 ? void 0 : parsedCredential_1.authorization) {
|
|
114
|
-
this.setAuthorization(
|
|
119
|
+
this.setAuthorization({
|
|
120
|
+
authorization: parsedCredential_1.authorization,
|
|
121
|
+
});
|
|
115
122
|
this.API_HOST = parsedCredential_1.apiHost;
|
|
116
123
|
}
|
|
117
124
|
return [2 /*return*/, this.parseJSONSafe(existingAuth)];
|
|
@@ -131,7 +138,9 @@ var AmanoKoreaAdapter = /** @class */ (function () {
|
|
|
131
138
|
parsedCredential = this.parseJSONSafe(newAuth.credential);
|
|
132
139
|
console.log('🚀 ~ file: amanoKorea.ts:151 ~ AmanoKoreaAdapter ~ parsedCredential:', parsedCredential);
|
|
133
140
|
if (parsedCredential === null || parsedCredential === void 0 ? void 0 : parsedCredential.authorization) {
|
|
134
|
-
this.setAuthorization(
|
|
141
|
+
this.setAuthorization({
|
|
142
|
+
authorization: parsedCredential.authorization,
|
|
143
|
+
});
|
|
135
144
|
this.API_HOST = parsedCredential.apiHost;
|
|
136
145
|
}
|
|
137
146
|
else {
|