@vendit-dev/thirdparty-adapters 0.3.27 → 0.3.28
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/themrIoT.js +3 -5
- package/package.json +1 -1
package/lib/adapters/themrIoT.js
CHANGED
|
@@ -108,7 +108,7 @@ var ThemrIoTAdapter = /** @class */ (function () {
|
|
|
108
108
|
this.getAccommodationAuthInfo = function (_a) {
|
|
109
109
|
var accommodationId = _a.accommodationId;
|
|
110
110
|
return __awaiter(_this, void 0, void 0, function () {
|
|
111
|
-
var existingAuth, lockId, lockHash, newAuth, err_1;
|
|
111
|
+
var existingAuth, lockId, lockHash, newAuth, parsedCredential, err_1;
|
|
112
112
|
return __generator(this, function (_b) {
|
|
113
113
|
switch (_b.label) {
|
|
114
114
|
case 0: return [4 /*yield*/, this.redis.get(ThemrIoTAdapter.indexAccommodation({ accommodationId: accommodationId }))];
|
|
@@ -145,13 +145,11 @@ var ThemrIoTAdapter = /** @class */ (function () {
|
|
|
145
145
|
_b.sent();
|
|
146
146
|
return [2 /*return*/, false];
|
|
147
147
|
case 7:
|
|
148
|
-
|
|
149
|
-
newAuth.credential = this.parseJSONSafe(newAuth.credential);
|
|
148
|
+
parsedCredential = this.parseJSONSafe(newAuth.credential);
|
|
150
149
|
return [4 /*yield*/, this.redis.set(ThemrIoTAdapter.indexAccommodation({ accommodationId: accommodationId }), JSON.stringify(newAuth), 'EX', 60 * 10)];
|
|
151
150
|
case 8:
|
|
152
151
|
_b.sent();
|
|
153
|
-
|
|
154
|
-
return [2 /*return*/, newAuth];
|
|
152
|
+
return [2 /*return*/, parsedCredential];
|
|
155
153
|
case 9:
|
|
156
154
|
err_1 = _b.sent();
|
|
157
155
|
console.log(err_1);
|