abmp-npm 1.1.78 → 1.1.80
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/backend/consts.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const PAC_API_URL = 'https://members.abmp.com/eweb/api/Wix';
|
|
2
|
+
const BACKUP_API_URL = 'https://psdevteamenterpris.wixstudio.com/abmp-backup/_functions';
|
|
2
3
|
const SSO_TOKEN_AUTH_API_URL = 'https://members.professionalassistcorp.com/';
|
|
3
4
|
|
|
4
5
|
/**
|
|
@@ -40,4 +41,5 @@ module.exports = {
|
|
|
40
41
|
COMPILED_FILTERS_FIELDS,
|
|
41
42
|
MEMBERSHIPS_TYPES,
|
|
42
43
|
SSO_TOKEN_AUTH_API_URL,
|
|
44
|
+
BACKUP_API_URL,
|
|
43
45
|
};
|
|
@@ -133,7 +133,7 @@ async function getMemberBySlug({
|
|
|
133
133
|
}
|
|
134
134
|
query = query.limit(1000);
|
|
135
135
|
const searchResult = await searchAllItems(query);
|
|
136
|
-
const membersList = searchResult.
|
|
136
|
+
const membersList = searchResult.filter(item => item.url && item.url.includes(slug)); //replacement for contains
|
|
137
137
|
let matchingMembers = membersList.filter(
|
|
138
138
|
item => item.url && item.url.toLowerCase() === slug.toLowerCase()
|
|
139
139
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { PAC_API_URL } = require('./consts');
|
|
1
|
+
const { PAC_API_URL: _PAC_API_URL, BACKUP_API_URL } = require('./consts');
|
|
2
2
|
const { getSecret } = require('./utils');
|
|
3
3
|
|
|
4
4
|
const getHeaders = async () => {
|
|
@@ -9,7 +9,7 @@ const getHeaders = async () => {
|
|
|
9
9
|
return headers;
|
|
10
10
|
};
|
|
11
11
|
const fetchPACMembers = async (pageNum, actionFilter) => {
|
|
12
|
-
const url = `${
|
|
12
|
+
const url = `${BACKUP_API_URL}/Members?page=${pageNum}&actionFilter=${actionFilter}`;
|
|
13
13
|
const headers = await getHeaders();
|
|
14
14
|
const fetchOptions = {
|
|
15
15
|
method: 'get',
|