@plusscommunities/pluss-newsletter-aws-projects 2.0.6-auth.0 → 2.0.7-auth.0
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.
|
@@ -83,11 +83,13 @@ module.exports.getRecentNewsletterEntries = (event, context, callback) => {
|
|
|
83
83
|
return !entry.Private && (!tvMode || entry.TVMode);
|
|
84
84
|
});
|
|
85
85
|
// if (!canManage) {
|
|
86
|
-
|
|
87
|
-
filteredResult
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
if (event.headers.authkey) {
|
|
87
|
+
filteredResult = await filterByAudienceType(
|
|
88
|
+
filteredResult,
|
|
89
|
+
event.headers.authkey,
|
|
90
|
+
site
|
|
91
|
+
);
|
|
92
|
+
}
|
|
91
93
|
// }
|
|
92
94
|
const sortedResult = _.take(
|
|
93
95
|
_.sortBy(filteredResult, "UnixTimestampReverse"),
|
package/newsletterChanged.js
CHANGED
|
@@ -7,6 +7,7 @@ const deleteRef = require("./common/db/common/deleteRef");
|
|
|
7
7
|
const updateRef = require("./common/db/common/updateRef");
|
|
8
8
|
const logUpdate = require("./common/db/strings/logUpdate");
|
|
9
9
|
const publishNotifications = require("./common/db/notifications/publishNotifications");
|
|
10
|
+
const deleteNotificationsByEntity = require("./common/db/notifications/deleteNotificationsByEntity");
|
|
10
11
|
const getAudience = require("./common/helper/audience/getAudience");
|
|
11
12
|
const updateAttribute = require("./common/db/common/updateAttribute");
|
|
12
13
|
const logAnalyticsActivity = require("@plusscommunities/pluss-core-aws/db/analytics/logAnalyticsActivity");
|
|
@@ -169,6 +170,7 @@ module.exports.newsletterChanged = (event, context, callback) => {
|
|
|
169
170
|
});
|
|
170
171
|
|
|
171
172
|
createUserEntries(data, tagged, toRemove);
|
|
173
|
+
if (data.Deleted) deleteNotificationsByEntity(data.RowId);
|
|
172
174
|
|
|
173
175
|
site = data.Site;
|
|
174
176
|
} else if (record.eventName == "REMOVE") {
|
|
@@ -185,6 +187,7 @@ module.exports.newsletterChanged = (event, context, callback) => {
|
|
|
185
187
|
oldTags.push(previousData.SubmittedBy.id);
|
|
186
188
|
|
|
187
189
|
createUserEntries(previousData, [], oldTags);
|
|
190
|
+
deleteNotificationsByEntity(previousData.RowId);
|
|
188
191
|
|
|
189
192
|
site = previousData.Site;
|
|
190
193
|
}
|
package/package-lock.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plusscommunities/pluss-newsletter-aws-projects",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7-auth.0",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -1703,9 +1703,9 @@
|
|
|
1703
1703
|
}
|
|
1704
1704
|
},
|
|
1705
1705
|
"@plusscommunities/pluss-core-aws": {
|
|
1706
|
-
"version": "2.0.
|
|
1707
|
-
"resolved": "https://registry.npmjs.org/@plusscommunities/pluss-core-aws/-/pluss-core-aws-2.0.
|
|
1708
|
-
"integrity": "sha512-
|
|
1706
|
+
"version": "2.0.9-auth.0",
|
|
1707
|
+
"resolved": "https://registry.npmjs.org/@plusscommunities/pluss-core-aws/-/pluss-core-aws-2.0.9-auth.0.tgz",
|
|
1708
|
+
"integrity": "sha512-b3RxXF6W2kRZrOV2ApqdyArTrk1WuqiuHjM2aufdiIQfpbKHC/iIGOGxjMYRLQIwL5HyvaYotUPwQa4YxsojqA==",
|
|
1709
1709
|
"requires": {
|
|
1710
1710
|
"@aws/dynamodb-auto-marshaller": "^0.7.1",
|
|
1711
1711
|
"amazon-cognito-identity-js": "^2.0.19",
|
|
@@ -1848,9 +1848,9 @@
|
|
|
1848
1848
|
}
|
|
1849
1849
|
},
|
|
1850
1850
|
"@types/express-serve-static-core": {
|
|
1851
|
-
"version": "4.19.
|
|
1852
|
-
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.
|
|
1853
|
-
"integrity": "sha512-
|
|
1851
|
+
"version": "4.19.6",
|
|
1852
|
+
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz",
|
|
1853
|
+
"integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==",
|
|
1854
1854
|
"requires": {
|
|
1855
1855
|
"@types/node": "*",
|
|
1856
1856
|
"@types/qs": "*",
|
|
@@ -1907,9 +1907,9 @@
|
|
|
1907
1907
|
}
|
|
1908
1908
|
},
|
|
1909
1909
|
"@types/jsonwebtoken": {
|
|
1910
|
-
"version": "9.0.
|
|
1911
|
-
"resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.
|
|
1912
|
-
"integrity": "sha512
|
|
1910
|
+
"version": "9.0.7",
|
|
1911
|
+
"resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.7.tgz",
|
|
1912
|
+
"integrity": "sha512-ugo316mmTYBl2g81zDFnZ7cfxlut3o+/EQdaP7J8QN2kY6lJ22hmQYCK5EHcJHbrW+dkCGSCPgbG8JtYj6qSrg==",
|
|
1913
1913
|
"requires": {
|
|
1914
1914
|
"@types/node": "*"
|
|
1915
1915
|
}
|
|
@@ -1925,9 +1925,9 @@
|
|
|
1925
1925
|
"integrity": "sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg=="
|
|
1926
1926
|
},
|
|
1927
1927
|
"@types/qs": {
|
|
1928
|
-
"version": "6.9.
|
|
1929
|
-
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.
|
|
1930
|
-
"integrity": "sha512-
|
|
1928
|
+
"version": "6.9.17",
|
|
1929
|
+
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.17.tgz",
|
|
1930
|
+
"integrity": "sha512-rX4/bPcfmvxHDv0XjfJELTTr+iB+tn032nPILqHm5wbthUUUuVtNGGqzhya9XUxjTP8Fpr0qYgSZZKxGY++svQ=="
|
|
1931
1931
|
},
|
|
1932
1932
|
"@types/range-parser": {
|
|
1933
1933
|
"version": "1.2.7",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plusscommunities/pluss-newsletter-aws-projects",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7-auth.0",
|
|
4
4
|
"description": "Extension package to enable newsletter on Pluss Communities Platform",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"gc": "node ../../tools/gc ./",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "ISC",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@aws/dynamodb-auto-marshaller": "^0.7.1",
|
|
31
|
-
"@plusscommunities/pluss-core-aws": "2.0.
|
|
31
|
+
"@plusscommunities/pluss-core-aws": "2.0.9-auth.0",
|
|
32
32
|
"amazon-cognito-identity-js": "^2.0.19",
|
|
33
33
|
"axios": "^1.6.8",
|
|
34
34
|
"aws-sdk": "^2.1591.0",
|