@live-change/message-authentication-service 0.8.118 → 0.8.119

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/sign.js +3 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/message-authentication-service",
3
- "version": "0.8.118",
3
+ "version": "0.8.119",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,9 +21,9 @@
21
21
  "url": "https://www.viamage.com/"
22
22
  },
23
23
  "dependencies": {
24
- "@live-change/framework": "^0.8.118",
24
+ "@live-change/framework": "^0.8.119",
25
25
  "nodemailer": "^6.7.2"
26
26
  },
27
- "gitHead": "cfccde9b1d340cbb23df96a2f0fba72da0a6e3ab",
27
+ "gitHead": "1f0bb577d5bfe8b8d355775d7adbd73c789cd1d5",
28
28
  "type": "module"
29
29
  }
package/sign.js CHANGED
@@ -99,9 +99,8 @@ for(const contactType of config.contactTypes) {
99
99
  ...contactTypeProperties
100
100
  },
101
101
  async execute({ [contactTypeName]: contact }, { _client, service }, _emit) {
102
- const contactData = await service.trigger({ type: 'get' + contactTypeUName }, {
103
- [contactTypeName]: contact,
104
- })
102
+ const contactData = await app.viewGet('get'+contactTypeUName, { [contactType]: contact })
103
+ if(!contactData) throw { properties: { email: 'notFound' } }
105
104
  const messageData = {
106
105
  user: contactData.user
107
106
  }
@@ -179,9 +178,7 @@ for(const contactType of config.contactTypes) {
179
178
  ...contactTypeProperties
180
179
  },
181
180
  async execute({ [contactTypeName]: contact }, { client, service }, _emit) {
182
- const contactData = await service.trigger({ type: 'get' + contactTypeUName + 'OrNull' }, {
183
- [contactTypeName]: contact,
184
- })
181
+ const contactData = await app.viewGet('get'+contactTypeUName, { [contactType]: contact })
185
182
  if(contactData) {
186
183
  const messageData = {
187
184
  user: contactData.user