@things-factory/dataset 6.2.49 → 6.2.51

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/dataset",
3
- "version": "6.2.49",
3
+ "version": "6.2.51",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -37,19 +37,19 @@
37
37
  "@operato/shell": "^1.0.1",
38
38
  "@operato/styles": "^1.0.0",
39
39
  "@operato/utils": "^1.0.1",
40
- "@things-factory/auth-base": "^6.2.49",
41
- "@things-factory/aws-base": "^6.2.49",
42
- "@things-factory/board-service": "^6.2.49",
40
+ "@things-factory/auth-base": "^6.2.51",
41
+ "@things-factory/aws-base": "^6.2.51",
42
+ "@things-factory/board-service": "^6.2.51",
43
43
  "@things-factory/env": "^6.2.33",
44
- "@things-factory/organization": "^6.2.49",
45
- "@things-factory/scheduler-client": "^6.2.49",
46
- "@things-factory/shell": "^6.2.48",
47
- "@things-factory/work-shift": "^6.2.49",
48
- "@things-factory/worklist": "^6.2.49",
44
+ "@things-factory/organization": "^6.2.51",
45
+ "@things-factory/scheduler-client": "^6.2.51",
46
+ "@things-factory/shell": "^6.2.51",
47
+ "@things-factory/work-shift": "^6.2.51",
48
+ "@things-factory/worklist": "^6.2.51",
49
49
  "cron-parser": "^4.3.0",
50
50
  "moment-timezone": "^0.5.40",
51
51
  "simple-statistics": "^7.8.3",
52
52
  "statistics": "^3.3.0"
53
53
  },
54
- "gitHead": "57266c96220301729f9c5cd633af1a4e2a651096"
54
+ "gitHead": "365e8ae6475eede1a4fd51460c24569d13de14b6"
55
55
  }
@@ -1,20 +1,11 @@
1
1
  import i18next from 'i18next'
2
2
  import fetch from 'node-fetch'
3
- import {
4
- Arg,
5
- Ctx,
6
- Directive,
7
- Mutation,
8
- Resolver
9
- } from 'type-graphql'
3
+ import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'
10
4
  import { In } from 'typeorm'
11
5
 
12
6
  import { getEndpointUrl } from '../../utils/config-resolver'
13
7
  import { DataArchive } from './data-archive'
14
- import {
15
- DataArchivePatch,
16
- NewDataArchive
17
- } from './data-archive-type'
8
+ import { DataArchivePatch, NewDataArchive } from './data-archive-type'
18
9
 
19
10
  const { config } = require('@things-factory/env')
20
11
  const crypto = require('crypto')
@@ -196,7 +187,7 @@ export class DataArchiveMutation {
196
187
  async deleteDataArchive(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {
197
188
  const { domain, tx } = context.state
198
189
 
199
- await tx.getRepository(DataArchive).delete({ domain, id })
190
+ await tx.getRepository(DataArchive).delete({ domain: { id: domain.id }, id })
200
191
  return true
201
192
  }
202
193
 
@@ -210,7 +201,7 @@ export class DataArchiveMutation {
210
201
  const { domain, tx } = context.state
211
202
 
212
203
  await tx.getRepository(DataArchive).delete({
213
- domain,
204
+ domain: { id: domain.id },
214
205
  id: In(ids)
215
206
  })
216
207