@things-factory/biz-base 6.2.48 → 6.2.50

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/biz-base",
3
- "version": "6.2.48",
3
+ "version": "6.2.50",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,7 +24,7 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@things-factory/auth-base": "^6.2.48"
27
+ "@things-factory/auth-base": "^6.2.50"
28
28
  },
29
- "gitHead": "70ed4f01ef662cde4d99911dc9374abd564cbe0e"
29
+ "gitHead": "4dc51db04b745ac434d2bb874038ac4c3b47989b"
30
30
  }
@@ -32,7 +32,8 @@ export class BizplaceMutation {
32
32
  @Arg('patch') patch: BizplacePatch,
33
33
  @Ctx() context: ResolverContext
34
34
  ): Promise<Bizplace> {
35
- const bizplace = await getRepository(Bizplace).findOneBy({ domain: context.state.domain, name })
35
+ const { domain, user } = context.state
36
+ const bizplace = await getRepository(Bizplace).findOneBy({ domain: { id: domain.id }, name })
36
37
 
37
38
  if (patch.company && patch.company.id) {
38
39
  patch.company = await getRepository(Company).findOneBy({ id: patch.company.id })
@@ -41,7 +42,7 @@ export class BizplaceMutation {
41
42
  return await getRepository(Bizplace).save({
42
43
  ...bizplace,
43
44
  ...patch,
44
- updater: context.state.user
45
+ updater: user
45
46
  })
46
47
  }
47
48