backend-manager 3.2.28 → 3.2.30
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/package.json
CHANGED
|
@@ -266,8 +266,11 @@ Module.prototype.addToSendGridList = function (user) {
|
|
|
266
266
|
body: {
|
|
267
267
|
backendManagerKey: Manager.config.backend_manager.key,
|
|
268
268
|
service: 'sendgrid',
|
|
269
|
-
command:
|
|
269
|
+
command: `v3/marketing/contacts`,
|
|
270
270
|
method: `put`,
|
|
271
|
+
supplemental: {
|
|
272
|
+
user: user,
|
|
273
|
+
},
|
|
271
274
|
body: {
|
|
272
275
|
contacts: [
|
|
273
276
|
{
|
|
@@ -595,15 +595,16 @@ BackendAssistant.prototype.authenticate = async function (options) {
|
|
|
595
595
|
self.request.user.roles.admin = true;
|
|
596
596
|
return _resolve(self.request.user);
|
|
597
597
|
}
|
|
598
|
-
} else if (options.apiKey) {
|
|
599
|
-
|
|
598
|
+
} else if (options.apiKey || data.apiKey) {
|
|
599
|
+
const apiKey = apiKey || data.apiKey;
|
|
600
|
+
self.log('Found "options.apiKey"', apiKey, logOptions);
|
|
600
601
|
|
|
601
|
-
if (
|
|
602
|
+
if (apiKey.includes('test')) {
|
|
602
603
|
return _resolve(self.request.user);
|
|
603
604
|
}
|
|
604
605
|
|
|
605
606
|
await admin.firestore().collection(`users`)
|
|
606
|
-
.where('api.privateKey', '==',
|
|
607
|
+
.where('api.privateKey', '==', apiKey)
|
|
607
608
|
.get()
|
|
608
609
|
.then(function(querySnapshot) {
|
|
609
610
|
querySnapshot.forEach(function(doc) {
|