@things-factory/auth-base 6.0.18 → 6.0.21

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/auth-base",
3
- "version": "6.0.18",
3
+ "version": "6.0.21",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -28,10 +28,10 @@
28
28
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
29
29
  },
30
30
  "dependencies": {
31
- "@things-factory/email-base": "^6.0.18",
31
+ "@things-factory/email-base": "^6.0.21",
32
32
  "@things-factory/env": "^6.0.7",
33
- "@things-factory/i18n-base": "^6.0.18",
34
- "@things-factory/shell": "^6.0.18",
33
+ "@things-factory/i18n-base": "^6.0.21",
34
+ "@things-factory/shell": "^6.0.21",
35
35
  "@things-factory/utils": "^6.0.7",
36
36
  "jsonwebtoken": "^8.5.1",
37
37
  "koa-passport": "^4.1.4",
@@ -41,5 +41,5 @@
41
41
  "passport-jwt": "^4.0.0",
42
42
  "passport-local": "^1.0.0"
43
43
  },
44
- "gitHead": "2e3e970ad20b2d7b67653ce04341bdf150ae7ebc"
44
+ "gitHead": "074a4f460d08fed4bc7e9882aa57f4c120cf0f11"
45
45
  }
@@ -34,7 +34,7 @@ export class GrantedRoleQuery {
34
34
  if (!customerDomain) throw new Error(`Failed to find customer by passed customerId (${customerId})`)
35
35
 
36
36
  const hasPartnership: boolean = Boolean(
37
- await getRepository(Partner).countBy({ domain: { id: domain.id }, partnerDomain: customerDomain })
37
+ await getRepository(Partner).countBy({ domain: { id: domain.id }, partnerDomain: { id: customerDomain.id } })
38
38
  )
39
39
 
40
40
  if (!hasPartnership) throw new Error(`Company doesn't have partnership with ${customerDomain.name}`)
@@ -17,7 +17,7 @@ export class PartnerMutation {
17
17
 
18
18
  const isExistingCustomer: boolean = Boolean(
19
19
  await getRepository(Partner).count({
20
- where: { domain: { id: domain.id }, partnerDomain: customerDomain }
20
+ where: { domain: { id: domain.id }, partnerDomain: { id: customerDomain.id } }
21
21
  })
22
22
  )
23
23
  if (isExistingCustomer) throw new Error('Partner is registered as customer already')