abmp-npm 1.1.5 → 1.1.7
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.
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const { webMethod, Permissions } = require('@wix/web-methods');
|
|
2
|
-
|
|
3
1
|
const { COLLECTIONS } = require('../public');
|
|
4
2
|
|
|
5
3
|
const { triggerAutomation } = require('./automations-methods');
|
|
@@ -8,7 +6,7 @@ const { wixData } = require('./elevated-modules');
|
|
|
8
6
|
const { findMemberByWixDataId, createContactAndMemberIfNew } = require('./members-data-methods');
|
|
9
7
|
const { getSiteConfigs } = require('./utils');
|
|
10
8
|
|
|
11
|
-
const contactSubmission =
|
|
9
|
+
const contactSubmission = async (data, memberDataId) => {
|
|
12
10
|
const { firstName, lastName, email, phone, message } = data;
|
|
13
11
|
const [memberData, automationEmailTriggerId] = await Promise.all([
|
|
14
12
|
findMemberByWixDataId(memberDataId),
|
|
@@ -47,7 +45,7 @@ const contactSubmission = webMethod(Permissions.Anyone, async (data, memberDataI
|
|
|
47
45
|
};
|
|
48
46
|
await wixData.insert(COLLECTIONS.CONTACT_US_SUBMISSIONS, data);
|
|
49
47
|
return emailTriggered;
|
|
50
|
-
}
|
|
48
|
+
};
|
|
51
49
|
|
|
52
50
|
module.exports = {
|
|
53
51
|
contactSubmission,
|
package/backend/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "abmp-npm",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"@wix/essentials": "^0.1.28",
|
|
32
32
|
"@wix/members": "^1.0.330",
|
|
33
33
|
"@wix/site-window": "^1.44.0",
|
|
34
|
-
"@wix/web-methods": "^1.0.11",
|
|
35
34
|
"phone": "^3.1.67"
|
|
36
35
|
}
|
|
37
36
|
}
|