@things-factory/i18n-base 7.0.1-alpha.77 → 7.0.1-alpha.82
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/client/page/terminology-page.ts +131 -83
- package/client/route.ts +1 -1
- package/dist-client/page/terminology-page.d.ts +14 -5
- package/dist-client/page/terminology-page.js +126 -78
- package/dist-client/page/terminology-page.js.map +1 -1
- package/dist-client/route.js +1 -1
- package/dist-client/route.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/terminology/index.js +1 -2
- package/dist-server/service/terminology/index.js.map +1 -1
- package/dist-server/service/terminology/terminology-mutation.js +26 -3
- package/dist-server/service/terminology/terminology-mutation.js.map +1 -1
- package/dist-server/service/terminology/terminology-query.js +21 -0
- package/dist-server/service/terminology/terminology-query.js.map +1 -1
- package/dist-server/service/terminology/terminology-type.js +3 -3
- package/dist-server/service/terminology/terminology-type.js.map +1 -1
- package/dist-server/service/terminology/terminology.js +20 -3
- package/dist-server/service/terminology/terminology.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/server/service/index.ts +5 -1
- package/server/service/terminology/index.ts +1 -2
- package/server/service/terminology/terminology-mutation.ts +48 -6
- package/server/service/terminology/terminology-query.ts +11 -0
- package/server/service/terminology/terminology-type.ts +6 -6
- package/server/service/terminology/terminology.ts +30 -8
- package/things-factory.config.js +9 -1
- package/translations/en.json +7 -0
- package/translations/ja.json +7 -0
- package/translations/ko.json +7 -0
- package/translations/ms.json +7 -0
- package/translations/zh.json +7 -0
- package/dist-server/service/terminology/event-subscriber.js +0 -40
- package/dist-server/service/terminology/event-subscriber.js.map +0 -1
- package/server/service/terminology/event-subscriber.ts +0 -41
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/i18n-base",
|
|
3
|
-
"version": "7.0.1-alpha.
|
|
3
|
+
"version": "7.0.1-alpha.82",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@operato/i18n": "^2.0.0-alpha.0",
|
|
31
|
+
"@things-factory/auth-base": "^7.0.1-alpha.81",
|
|
31
32
|
"@things-factory/shell": "^7.0.1-alpha.71"
|
|
32
33
|
},
|
|
33
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "9e5a8101c23f6e6cfffd17fcfad44154e26aa0bd"
|
|
34
35
|
}
|
package/server/service/index.ts
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
export * from './terminology/terminology'
|
|
3
3
|
|
|
4
4
|
/* IMPORT ENTITIES AND RESOLVERS */
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
entities as TerminologyEntities,
|
|
7
|
+
resolvers as TerminologyResolvers,
|
|
8
|
+
subscribers as TerminologySubscribers
|
|
9
|
+
} from './terminology'
|
|
6
10
|
|
|
7
11
|
export const entities = [
|
|
8
12
|
/* ENTITIES */
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Terminology } from './terminology'
|
|
2
2
|
import { TerminologyQuery } from './terminology-query'
|
|
3
3
|
import { TerminologyMutation } from './terminology-mutation'
|
|
4
|
-
import { TerminologySubscriber } from './event-subscriber'
|
|
5
4
|
|
|
6
5
|
export const entities = [Terminology]
|
|
7
6
|
export const resolvers = [TerminologyQuery, TerminologyMutation]
|
|
8
|
-
export const subscribers = [
|
|
7
|
+
export const subscribers = []
|
|
@@ -6,24 +6,43 @@ import { NewTerminology, TerminologyPatch } from './terminology-type'
|
|
|
6
6
|
|
|
7
7
|
import { clearTranslationCacheForCertainDomain } from '../../controllers/clear-cache-for-translation'
|
|
8
8
|
|
|
9
|
+
function clearCache(subdomain: string) {
|
|
10
|
+
/** multiple update/delete시 모든 엔티티에 대해서 subscription 이 걸리므로, EventSubscriber를 사용하지 않음. */
|
|
11
|
+
try {
|
|
12
|
+
clearTranslationCacheForCertainDomain(subdomain)
|
|
13
|
+
} catch (err) {
|
|
14
|
+
console.error('Failed to delete the translations cache directory:', err)
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
@Resolver(Terminology)
|
|
10
19
|
export class TerminologyMutation {
|
|
11
20
|
@Directive('@transaction')
|
|
21
|
+
@Directive('@privilege(category: "terminology", privilege: "mutation")')
|
|
12
22
|
@Mutation(returns => Terminology, { description: 'To create new Terminology' })
|
|
13
23
|
async createTerminology(@Arg('terminology') terminology: NewTerminology, @Ctx() context: any): Promise<Terminology> {
|
|
14
24
|
const { domain, user, tx } = context.state
|
|
15
25
|
|
|
16
|
-
|
|
26
|
+
const result = await tx.getRepository(Terminology).save({
|
|
17
27
|
...terminology,
|
|
18
28
|
domain,
|
|
19
29
|
creator: user,
|
|
20
30
|
updater: user
|
|
21
31
|
})
|
|
32
|
+
|
|
33
|
+
clearCache(domain.subdomain)
|
|
34
|
+
|
|
35
|
+
return result
|
|
22
36
|
}
|
|
23
37
|
|
|
24
38
|
@Directive('@transaction')
|
|
39
|
+
@Directive('@privilege(category: "terminology", privilege: "mutation")')
|
|
25
40
|
@Mutation(returns => Terminology, { description: 'To modify Terminology information' })
|
|
26
|
-
async updateTerminology(
|
|
41
|
+
async updateTerminology(
|
|
42
|
+
@Arg('id') id: string,
|
|
43
|
+
@Arg('patch') patch: TerminologyPatch,
|
|
44
|
+
@Ctx() context: any
|
|
45
|
+
): Promise<Terminology> {
|
|
27
46
|
const { domain, user, tx } = context.state
|
|
28
47
|
|
|
29
48
|
const repository = tx.getRepository(Terminology)
|
|
@@ -31,16 +50,24 @@ export class TerminologyMutation {
|
|
|
31
50
|
where: { domain: { id: domain.id }, id }
|
|
32
51
|
})
|
|
33
52
|
|
|
34
|
-
|
|
53
|
+
const result = await repository.save({
|
|
35
54
|
...terminology,
|
|
36
55
|
...patch,
|
|
37
56
|
updater: user
|
|
38
57
|
})
|
|
58
|
+
|
|
59
|
+
clearCache(domain.subdomain)
|
|
60
|
+
|
|
61
|
+
return result
|
|
39
62
|
}
|
|
40
63
|
|
|
41
64
|
@Directive('@transaction')
|
|
65
|
+
@Directive('@privilege(category: "terminology", privilege: "mutation")')
|
|
42
66
|
@Mutation(returns => [Terminology], { description: "To modify multiple Terminologies' information" })
|
|
43
|
-
async updateMultipleTerminologies(
|
|
67
|
+
async updateMultipleTerminologies(
|
|
68
|
+
@Arg('patches', type => [TerminologyPatch]) patches: TerminologyPatch[],
|
|
69
|
+
@Ctx() context: any
|
|
70
|
+
): Promise<Terminology[]> {
|
|
44
71
|
const { domain, user, tx } = context.state
|
|
45
72
|
|
|
46
73
|
let results = []
|
|
@@ -78,6 +105,8 @@ export class TerminologyMutation {
|
|
|
78
105
|
}
|
|
79
106
|
}
|
|
80
107
|
|
|
108
|
+
clearCache(domain.subdomain)
|
|
109
|
+
|
|
81
110
|
return results
|
|
82
111
|
}
|
|
83
112
|
|
|
@@ -86,21 +115,26 @@ export class TerminologyMutation {
|
|
|
86
115
|
async clearTranslationsCache(@Ctx() context: any): Promise<boolean> {
|
|
87
116
|
const { domain, tx } = context.state
|
|
88
117
|
|
|
89
|
-
|
|
118
|
+
clearCache(domain.subdomain)
|
|
90
119
|
|
|
91
120
|
return true
|
|
92
121
|
}
|
|
93
122
|
|
|
94
123
|
@Directive('@transaction')
|
|
124
|
+
@Directive('@privilege(category: "terminology", privilege: "mutation")')
|
|
95
125
|
@Mutation(returns => Boolean, { description: 'To delete Terminology' })
|
|
96
126
|
async deleteTerminology(@Arg('id') id: string, @Ctx() context: any): Promise<boolean> {
|
|
97
127
|
const { domain, tx } = context.state
|
|
98
128
|
|
|
99
129
|
await tx.getRepository(Terminology).delete({ domain: { id: domain.id }, id })
|
|
130
|
+
|
|
131
|
+
clearCache(domain.subdomain)
|
|
132
|
+
|
|
100
133
|
return true
|
|
101
134
|
}
|
|
102
135
|
|
|
103
136
|
@Directive('@transaction')
|
|
137
|
+
@Directive('@privilege(category: "terminology", privilege: "mutation")')
|
|
104
138
|
@Mutation(returns => Boolean, { description: 'To delete multiple Terminologies' })
|
|
105
139
|
async deleteTerminologies(@Arg('ids', type => [String]) ids: string[], @Ctx() context: any): Promise<boolean> {
|
|
106
140
|
const { domain, tx } = context.state
|
|
@@ -110,12 +144,18 @@ export class TerminologyMutation {
|
|
|
110
144
|
id: In(ids)
|
|
111
145
|
})
|
|
112
146
|
|
|
147
|
+
clearCache(domain.subdomain)
|
|
148
|
+
|
|
113
149
|
return true
|
|
114
150
|
}
|
|
115
151
|
|
|
116
152
|
@Directive('@transaction')
|
|
153
|
+
@Directive('@privilege(category: "terminology", privilege: "mutation")')
|
|
117
154
|
@Mutation(returns => Boolean, { description: 'To import multiple Terminologies' })
|
|
118
|
-
async importTerminologies(
|
|
155
|
+
async importTerminologies(
|
|
156
|
+
@Arg('terminologies', type => [TerminologyPatch]) terminologies: TerminologyPatch[],
|
|
157
|
+
@Ctx() context: any
|
|
158
|
+
): Promise<boolean> {
|
|
119
159
|
const { domain, tx } = context.state
|
|
120
160
|
|
|
121
161
|
await Promise.all(
|
|
@@ -124,6 +164,8 @@ export class TerminologyMutation {
|
|
|
124
164
|
})
|
|
125
165
|
)
|
|
126
166
|
|
|
167
|
+
clearCache(domain.subdomain)
|
|
168
|
+
|
|
127
169
|
return true
|
|
128
170
|
}
|
|
129
171
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'
|
|
2
2
|
|
|
3
3
|
import { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'
|
|
4
|
+
import { User } from '@things-factory/auth-base'
|
|
4
5
|
|
|
5
6
|
import { Terminology } from './terminology'
|
|
6
7
|
import { TerminologyList } from './terminology-type'
|
|
@@ -36,4 +37,14 @@ export class TerminologyQuery {
|
|
|
36
37
|
async domain(@Root() terminology: Terminology): Promise<Domain> {
|
|
37
38
|
return await getRepository(Domain).findOneBy({ id: terminology.domainId })
|
|
38
39
|
}
|
|
40
|
+
|
|
41
|
+
@FieldResolver(type => User)
|
|
42
|
+
async updater(@Root() terminology: Terminology): Promise<User> {
|
|
43
|
+
return await getRepository(User).findOneBy({ id: terminology.updaterId })
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@FieldResolver(type => User)
|
|
47
|
+
async creator(@Root() terminology: Terminology): Promise<User> {
|
|
48
|
+
return await getRepository(User).findOneBy({ id: terminology.creatorId })
|
|
49
|
+
}
|
|
39
50
|
}
|
|
@@ -31,14 +31,14 @@ export class TerminologyPatch {
|
|
|
31
31
|
@Field({ nullable: true })
|
|
32
32
|
description?: string
|
|
33
33
|
|
|
34
|
-
@Field()
|
|
35
|
-
locale
|
|
34
|
+
@Field({ nullable: true })
|
|
35
|
+
locale?: string
|
|
36
36
|
|
|
37
|
-
@Field()
|
|
38
|
-
category
|
|
37
|
+
@Field({ nullable: true })
|
|
38
|
+
category?: string
|
|
39
39
|
|
|
40
|
-
@Field()
|
|
41
|
-
display
|
|
40
|
+
@Field({ nullable: true })
|
|
41
|
+
display?: string
|
|
42
42
|
|
|
43
43
|
@Field({ nullable: true })
|
|
44
44
|
cuFlag?: string
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { Field, ID, ObjectType } from 'type-graphql'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Column,
|
|
4
|
+
CreateDateColumn,
|
|
5
|
+
Entity,
|
|
6
|
+
Index,
|
|
7
|
+
ManyToOne,
|
|
8
|
+
PrimaryGeneratedColumn,
|
|
9
|
+
RelationId,
|
|
10
|
+
UpdateDateColumn
|
|
11
|
+
} from 'typeorm'
|
|
3
12
|
|
|
4
13
|
import { Domain } from '@things-factory/shell'
|
|
14
|
+
import { User } from '@things-factory/auth-base'
|
|
5
15
|
|
|
6
16
|
@Entity()
|
|
7
17
|
@ObjectType({ description: 'Entity for Terminology' })
|
|
@@ -23,25 +33,23 @@ export class Terminology {
|
|
|
23
33
|
|
|
24
34
|
@Column()
|
|
25
35
|
@Field()
|
|
26
|
-
name
|
|
36
|
+
name?: string
|
|
27
37
|
|
|
28
|
-
@Column({
|
|
29
|
-
nullable: true
|
|
30
|
-
})
|
|
38
|
+
@Column({ nullable: true })
|
|
31
39
|
@Field({ nullable: true })
|
|
32
40
|
description?: string
|
|
33
41
|
|
|
34
42
|
@Field()
|
|
35
43
|
@Column({ length: 20 })
|
|
36
|
-
locale
|
|
44
|
+
locale?: string
|
|
37
45
|
|
|
38
46
|
@Field()
|
|
39
47
|
@Column({ length: 20 })
|
|
40
|
-
category
|
|
48
|
+
category?: string
|
|
41
49
|
|
|
42
50
|
@Field()
|
|
43
51
|
@Column()
|
|
44
|
-
display
|
|
52
|
+
display?: string
|
|
45
53
|
|
|
46
54
|
@CreateDateColumn()
|
|
47
55
|
@Field({ nullable: true })
|
|
@@ -50,4 +58,18 @@ export class Terminology {
|
|
|
50
58
|
@UpdateDateColumn()
|
|
51
59
|
@Field({ nullable: true })
|
|
52
60
|
updatedAt?: Date
|
|
61
|
+
|
|
62
|
+
@ManyToOne(type => User, { nullable: true })
|
|
63
|
+
@Field({ nullable: true })
|
|
64
|
+
creator?: User
|
|
65
|
+
|
|
66
|
+
@RelationId((terminology: Terminology) => terminology.creator)
|
|
67
|
+
creatorId?: string
|
|
68
|
+
|
|
69
|
+
@ManyToOne(type => User, { nullable: true })
|
|
70
|
+
@Field({ nullable: true })
|
|
71
|
+
updater?: User
|
|
72
|
+
|
|
73
|
+
@RelationId((terminology: Terminology) => terminology.updater)
|
|
74
|
+
updaterId?: string
|
|
53
75
|
}
|
package/things-factory.config.js
CHANGED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TerminologySubscriber = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const typeorm_1 = require("typeorm");
|
|
6
|
-
const shell_1 = require("@things-factory/shell");
|
|
7
|
-
const terminology_1 = require("./terminology");
|
|
8
|
-
const clear_cache_for_translation_1 = require("../../controllers/clear-cache-for-translation");
|
|
9
|
-
function clearCache(subdomain) {
|
|
10
|
-
try {
|
|
11
|
-
(0, clear_cache_for_translation_1.clearTranslationCacheForCertainDomain)(subdomain);
|
|
12
|
-
}
|
|
13
|
-
catch (err) {
|
|
14
|
-
console.error('Failed to delete the translations cache directory:', err);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
let TerminologySubscriber = class TerminologySubscriber {
|
|
18
|
-
listenTo() {
|
|
19
|
-
return terminology_1.Terminology;
|
|
20
|
-
}
|
|
21
|
-
async afterInsert(event) {
|
|
22
|
-
const { entity: terminology, manager: tx } = event;
|
|
23
|
-
const domain = await tx.getRepository(shell_1.Domain).findOne({
|
|
24
|
-
where: { id: terminology.domainId }
|
|
25
|
-
});
|
|
26
|
-
clearCache(domain.subdomain);
|
|
27
|
-
}
|
|
28
|
-
async afterUpdate(event) {
|
|
29
|
-
const { entity: terminology, manager: tx } = event;
|
|
30
|
-
const domain = await tx.getRepository(shell_1.Domain).findOne({
|
|
31
|
-
where: { id: terminology.domainId }
|
|
32
|
-
});
|
|
33
|
-
clearCache(domain.subdomain);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
TerminologySubscriber = tslib_1.__decorate([
|
|
37
|
-
(0, typeorm_1.EventSubscriber)()
|
|
38
|
-
], TerminologySubscriber);
|
|
39
|
-
exports.TerminologySubscriber = TerminologySubscriber;
|
|
40
|
-
//# sourceMappingURL=event-subscriber.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event-subscriber.js","sourceRoot":"","sources":["../../../server/service/terminology/event-subscriber.ts"],"names":[],"mappings":";;;;AAAA,qCAA8F;AAC9F,iDAA8C;AAE9C,+CAA2C;AAE3C,+FAAqG;AAErG,SAAS,UAAU,CAAC,SAAiB;IACnC,IAAI;QACF,IAAA,mEAAqC,EAAC,SAAS,CAAC,CAAA;KACjD;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,CAAC,KAAK,CAAC,oDAAoD,EAAE,GAAG,CAAC,CAAA;KACzE;AACH,CAAC;AAGM,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,QAAQ;QACN,OAAO,yBAAW,CAAA;IACpB,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAA+B;QAC/C,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,KAAK,CAAA;QAElD,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,cAAM,CAAC,CAAC,OAAO,CAAC;YACpD,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,CAAC,QAAQ,EAAE;SACpC,CAAC,CAAA;QAEF,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,KAA+B;QAC/C,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,KAAK,CAAA;QAElD,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,cAAM,CAAC,CAAC,OAAO,CAAC;YACpD,KAAK,EAAE,EAAE,EAAE,EAAE,WAAW,CAAC,QAAQ,EAAE;SACpC,CAAC,CAAA;QAEF,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;IAC9B,CAAC;CACF,CAAA;AAxBY,qBAAqB;IADjC,IAAA,yBAAe,GAAE;GACL,qBAAqB,CAwBjC;AAxBY,sDAAqB","sourcesContent":["import { EventSubscriber, EntitySubscriberInterface, InsertEvent, UpdateEvent } from 'typeorm'\nimport { Domain } from '@things-factory/shell'\n\nimport { Terminology } from './terminology'\n\nimport { clearTranslationCacheForCertainDomain } from '../../controllers/clear-cache-for-translation'\n\nfunction clearCache(subdomain: string) {\n try {\n clearTranslationCacheForCertainDomain(subdomain)\n } catch (err) {\n console.error('Failed to delete the translations cache directory:', err)\n }\n}\n\n@EventSubscriber()\nexport class TerminologySubscriber implements EntitySubscriberInterface<Terminology> {\n listenTo() {\n return Terminology\n }\n\n async afterInsert(event: InsertEvent<Terminology>): Promise<any | void> {\n const { entity: terminology, manager: tx } = event\n\n const domain = await tx.getRepository(Domain).findOne({\n where: { id: terminology.domainId }\n })\n\n clearCache(domain.subdomain)\n }\n\n async afterUpdate(event: UpdateEvent<Terminology>): Promise<any | void> {\n const { entity: terminology, manager: tx } = event\n\n const domain = await tx.getRepository(Domain).findOne({\n where: { id: terminology.domainId }\n })\n\n clearCache(domain.subdomain)\n }\n}\n"]}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { EventSubscriber, EntitySubscriberInterface, InsertEvent, UpdateEvent } from 'typeorm'
|
|
2
|
-
import { Domain } from '@things-factory/shell'
|
|
3
|
-
|
|
4
|
-
import { Terminology } from './terminology'
|
|
5
|
-
|
|
6
|
-
import { clearTranslationCacheForCertainDomain } from '../../controllers/clear-cache-for-translation'
|
|
7
|
-
|
|
8
|
-
function clearCache(subdomain: string) {
|
|
9
|
-
try {
|
|
10
|
-
clearTranslationCacheForCertainDomain(subdomain)
|
|
11
|
-
} catch (err) {
|
|
12
|
-
console.error('Failed to delete the translations cache directory:', err)
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@EventSubscriber()
|
|
17
|
-
export class TerminologySubscriber implements EntitySubscriberInterface<Terminology> {
|
|
18
|
-
listenTo() {
|
|
19
|
-
return Terminology
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
async afterInsert(event: InsertEvent<Terminology>): Promise<any | void> {
|
|
23
|
-
const { entity: terminology, manager: tx } = event
|
|
24
|
-
|
|
25
|
-
const domain = await tx.getRepository(Domain).findOne({
|
|
26
|
-
where: { id: terminology.domainId }
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
clearCache(domain.subdomain)
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async afterUpdate(event: UpdateEvent<Terminology>): Promise<any | void> {
|
|
33
|
-
const { entity: terminology, manager: tx } = event
|
|
34
|
-
|
|
35
|
-
const domain = await tx.getRepository(Domain).findOne({
|
|
36
|
-
where: { id: terminology.domainId }
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
clearCache(domain.subdomain)
|
|
40
|
-
}
|
|
41
|
-
}
|