@things-factory/board-service 8.0.64 → 8.0.72
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/board-service",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.72",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"things-factory": true,
|
|
6
6
|
"author": "",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"generic-pool": "^3.8.2",
|
|
34
34
|
"puppeteer": "^23.0.0"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "73d07f864bdd3dc7968155fe187d08f596df019b"
|
|
37
37
|
}
|
|
@@ -243,8 +243,17 @@ export class BoardMutation {
|
|
|
243
243
|
@Directive('@privilege(category: "board", privilege: "mutation", domainOwnerGranted: true)')
|
|
244
244
|
@Mutation(returns => Board, { description: 'To release a Board' })
|
|
245
245
|
async releaseBoard(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Board> {
|
|
246
|
-
const { domain, user, notify
|
|
247
|
-
|
|
246
|
+
const { domain, user, notify } = context.state
|
|
247
|
+
/**
|
|
248
|
+
* NOTE:
|
|
249
|
+
* 특정 환경에서 @transaction scope의 tx(EntityManager)가 afterUpdate subscriber(@operato/typeorm-history)
|
|
250
|
+
* 실행 시점에 이미 release된 상태로 전달되면서(QueryRunnerAlreadyReleasedError)
|
|
251
|
+
* history insert가 실패하는 문제가 발생합니다.
|
|
252
|
+
*
|
|
253
|
+
* release는 단일 UPDATE이므로, 여기서는 tx를 강제 사용하지 않고 기본 repository로 처리하여
|
|
254
|
+
* subscriber가 유효한 queryRunner로 동작하도록 합니다.
|
|
255
|
+
*/
|
|
256
|
+
const repository = getRepository(Board)
|
|
248
257
|
|
|
249
258
|
const board = await repository.findOne({
|
|
250
259
|
where: { domain: { id: domain.id }, id },
|