@vendit-dev/thirdparty-adapters 0.3.21 → 0.3.22
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.
|
@@ -137,6 +137,7 @@ var SmartAccessAdapter = /** @class */ (function () {
|
|
|
137
137
|
if (existingAuth === 'NOT_FOUND') {
|
|
138
138
|
throw new Error('THIRDPARTY_AUTH_NOT_FOUND');
|
|
139
139
|
}
|
|
140
|
+
console.log('AUTH 1', existingAuth);
|
|
140
141
|
return [2 /*return*/, this.parseJSONSafe(existingAuth)];
|
|
141
142
|
}
|
|
142
143
|
lockId = "SMARTACCESS-HKEY|" + accommodationId;
|
|
@@ -150,6 +151,7 @@ var SmartAccessAdapter = /** @class */ (function () {
|
|
|
150
151
|
case 4:
|
|
151
152
|
_b.trys.push([4, 9, 10, 12]);
|
|
152
153
|
if (existingAuth) {
|
|
154
|
+
console.log('AUTH 2', existingAuth);
|
|
153
155
|
return [2 /*return*/, this.parseJSONSafe(existingAuth)];
|
|
154
156
|
}
|
|
155
157
|
return [4 /*yield*/, this.authenticator.getThirdPartyCredential({ accommodationId: accommodationId, provider: this.PROVIDER_KEY })];
|
|
@@ -161,6 +163,7 @@ var SmartAccessAdapter = /** @class */ (function () {
|
|
|
161
163
|
_b.sent();
|
|
162
164
|
throw new Error('THIRDPARTY_AUTH_NOT_FOUND');
|
|
163
165
|
case 7:
|
|
166
|
+
console.log('AUTH 3', existingAuth);
|
|
164
167
|
parsedCredential = this.parseJSONSafe(newAuth.credential);
|
|
165
168
|
return [4 /*yield*/, this.redis.set(SmartAccessAdapter.indexAccommodation({ accommodationId: accommodationId }), newAuth.credential, 'EX', 60 * 5)];
|
|
166
169
|
case 8:
|