authscape 1.0.672 → 1.0.676
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/index.js +31 -28
- package/package.json +1 -1
- package/src/services/PrivateLabelPageModule.js +3 -4
package/index.js
CHANGED
|
@@ -9192,7 +9192,7 @@ function PrivateLabelPageModule(_x, _x2) {
|
|
|
9192
9192
|
}
|
|
9193
9193
|
function _PrivateLabelPageModule() {
|
|
9194
9194
|
_PrivateLabelPageModule = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(apiUri, host) {
|
|
9195
|
-
var data, response, dataResponse
|
|
9195
|
+
var data, response, dataResponse;
|
|
9196
9196
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
9197
9197
|
while (1) switch (_context.prev = _context.next) {
|
|
9198
9198
|
case 0:
|
|
@@ -9207,42 +9207,45 @@ function _PrivateLabelPageModule() {
|
|
|
9207
9207
|
case 4:
|
|
9208
9208
|
response = _context.sent;
|
|
9209
9209
|
if (!(response.status == 200)) {
|
|
9210
|
-
_context.next =
|
|
9210
|
+
_context.next = 16;
|
|
9211
9211
|
break;
|
|
9212
9212
|
}
|
|
9213
9213
|
_context.next = 8;
|
|
9214
9214
|
return response.json();
|
|
9215
9215
|
case 8:
|
|
9216
9216
|
dataResponse = _context.sent;
|
|
9217
|
-
if (dataResponse != null) {
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
|
|
9228
|
-
|
|
9229
|
-
|
|
9217
|
+
if (!(dataResponse != null)) {
|
|
9218
|
+
_context.next = 16;
|
|
9219
|
+
break;
|
|
9220
|
+
}
|
|
9221
|
+
if (dataResponse.companyId != null) {
|
|
9222
|
+
data.oemCompanyId = dataResponse.companyId;
|
|
9223
|
+
}
|
|
9224
|
+
if (dataResponse.demoCompanyId != null) {
|
|
9225
|
+
data.demoId = dataResponse.demoCompanyId;
|
|
9226
|
+
}
|
|
9227
|
+
if (dataResponse.favIcon != null) {
|
|
9228
|
+
data.favIcon = dataResponse.favIcon;
|
|
9229
|
+
}
|
|
9230
|
+
if (dataResponse.companyName != null) {
|
|
9231
|
+
data.companyName = dataResponse.companyName;
|
|
9232
|
+
}
|
|
9230
9233
|
|
|
9231
|
-
|
|
9232
|
-
|
|
9233
|
-
|
|
9234
|
-
|
|
9235
|
-
data.redirect = {
|
|
9236
|
-
destination: dataResponse.canonicalBaseUrl,
|
|
9237
|
-
// Replace with your target URL
|
|
9238
|
-
permanent: false // Set to true for a permanent redirect (HTTP 308)
|
|
9239
|
-
};
|
|
9240
|
-
}
|
|
9241
|
-
}
|
|
9234
|
+
// check for redirect
|
|
9235
|
+
if (!dataResponse.redirectTrafficToCanonical) {
|
|
9236
|
+
_context.next = 16;
|
|
9237
|
+
break;
|
|
9242
9238
|
}
|
|
9243
|
-
|
|
9239
|
+
return _context.abrupt("return", {
|
|
9240
|
+
redirect: {
|
|
9241
|
+
destination: dataResponse.canonicalBaseUrl,
|
|
9242
|
+
// Replace with your target URL
|
|
9243
|
+
permanent: false // Set to true for a permanent redirect (HTTP 308)
|
|
9244
|
+
}
|
|
9245
|
+
});
|
|
9246
|
+
case 16:
|
|
9244
9247
|
return _context.abrupt("return", data);
|
|
9245
|
-
case
|
|
9248
|
+
case 17:
|
|
9246
9249
|
case "end":
|
|
9247
9250
|
return _context.stop();
|
|
9248
9251
|
}
|
package/package.json
CHANGED
|
@@ -41,13 +41,12 @@ export async function PrivateLabelPageModule(apiUri, host) {
|
|
|
41
41
|
// check for redirect
|
|
42
42
|
if (dataResponse.redirectTrafficToCanonical)
|
|
43
43
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
data.redirect = {
|
|
44
|
+
return {
|
|
45
|
+
redirect: {
|
|
47
46
|
destination: dataResponse.canonicalBaseUrl, // Replace with your target URL
|
|
48
47
|
permanent: false, // Set to true for a permanent redirect (HTTP 308)
|
|
49
48
|
}
|
|
50
|
-
}
|
|
49
|
+
};
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
52
|
}
|