@quintype/framework 7.18.2-webengage.6 → 7.18.2
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/CHANGELOG.md +2 -0
- package/package.json +2 -2
- package/server/routes.js +0 -28
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [7.18.2](https://github.com/quintype/quintype-node-framework/compare/v7.18.1...v7.18.2) (2023-02-14)
|
|
6
|
+
|
|
5
7
|
### [7.18.1](https://github.com/quintype/quintype-node-framework/compare/v7.18.0...v7.18.1) (2023-01-30)
|
|
6
8
|
|
|
7
9
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quintype/framework",
|
|
3
|
-
"version": "7.18.2
|
|
3
|
+
"version": "7.18.2",
|
|
4
4
|
"description": "Libraries to help build Quintype Node.js apps",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"engines": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"homepage": "https://github.com/quintype/quintype-node-framework#readme",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ampproject/toolbox-optimizer": "2.8.3",
|
|
34
|
-
"@quintype/amp": "^2.9.
|
|
34
|
+
"@quintype/amp": "^2.9.2",
|
|
35
35
|
"@quintype/backend": "^2.3.3",
|
|
36
36
|
"@quintype/components": "^3.3.0",
|
|
37
37
|
"@quintype/prerender-node": "^3.2.26",
|
package/server/routes.js
CHANGED
|
@@ -28,7 +28,6 @@ const bodyParser = require("body-parser");
|
|
|
28
28
|
const get = require("lodash/get");
|
|
29
29
|
const { URL } = require("url");
|
|
30
30
|
const prerender = require("@quintype/prerender-node");
|
|
31
|
-
const request = require("request-promise");
|
|
32
31
|
|
|
33
32
|
/**
|
|
34
33
|
* *upstreamQuintypeRoutes* connects various routes directly to the upstream API server.
|
|
@@ -312,7 +311,6 @@ exports.isomorphicRoutes = function isomorphicRoutes(
|
|
|
312
311
|
handleNotFound = true,
|
|
313
312
|
redirectRootLevelStories = false,
|
|
314
313
|
mobileApiEnabled = true,
|
|
315
|
-
feEnabled = true,
|
|
316
314
|
mobileConfigFields = {},
|
|
317
315
|
templateOptions = false,
|
|
318
316
|
lightPages = false,
|
|
@@ -334,8 +332,6 @@ exports.isomorphicRoutes = function isomorphicRoutes(
|
|
|
334
332
|
sMaxAge = 900,
|
|
335
333
|
appLoadingPlaceholder = "",
|
|
336
334
|
fcmServerKey = "",
|
|
337
|
-
webengageLicenseCode,
|
|
338
|
-
webengageApiKey,
|
|
339
335
|
}
|
|
340
336
|
) {
|
|
341
337
|
const withConfig = withConfigPartial(getClient, logError, publisherConfig, configWrapper);
|
|
@@ -430,30 +426,6 @@ exports.isomorphicRoutes = function isomorphicRoutes(
|
|
|
430
426
|
|
|
431
427
|
app.post("/register-fcm-topic", bodyParser.json(), withConfig(registerFCMTopic, { publisherConfig, fcmServerKey }));
|
|
432
428
|
|
|
433
|
-
app.post("/webengage-api", bodyParser.json(), async (req, res) => {
|
|
434
|
-
const { headline, subheadline, slug } = req.body;
|
|
435
|
-
console.log("hit /webengage-api", webengageLicenseCode, webengageApiKey, req.body);
|
|
436
|
-
const url = `https://api.webengage.com/v2/accounts/${webengageLicenseCode}/business/save-event`;
|
|
437
|
-
try {
|
|
438
|
-
await request({
|
|
439
|
-
uri: url,
|
|
440
|
-
method: "POST",
|
|
441
|
-
headers: {
|
|
442
|
-
Authorization: `Bearer ${webengageApiKey}`,
|
|
443
|
-
"content-type": "application/json",
|
|
444
|
-
},
|
|
445
|
-
body: { eventName: "story_published", eventData: { author_name: "malibu", story_id: 123 } },
|
|
446
|
-
json: true,
|
|
447
|
-
});
|
|
448
|
-
res.status(200).send("webengage event triggered successfully");
|
|
449
|
-
return;
|
|
450
|
-
} catch (error) {
|
|
451
|
-
console.log("The error is -->", error);
|
|
452
|
-
res.status(500).send("webengage event Failed");
|
|
453
|
-
return;
|
|
454
|
-
}
|
|
455
|
-
});
|
|
456
|
-
|
|
457
429
|
if (manifestFn) {
|
|
458
430
|
app.get("/manifest.json", withConfig(handleManifest, { manifestFn, logError }));
|
|
459
431
|
}
|