@things-factory/board-service 6.4.7 → 6.4.10
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": "6.4.
|
|
3
|
+
"version": "6.4.10",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,11 +24,11 @@
|
|
|
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.4.
|
|
28
|
-
"@things-factory/env": "^6.
|
|
29
|
-
"@things-factory/fav-base": "^6.4.
|
|
30
|
-
"@things-factory/font-base": "^6.4.
|
|
31
|
-
"@things-factory/integration-base": "^6.4.
|
|
27
|
+
"@things-factory/auth-base": "^6.4.10",
|
|
28
|
+
"@things-factory/env": "^6.4.10",
|
|
29
|
+
"@things-factory/fav-base": "^6.4.10",
|
|
30
|
+
"@things-factory/font-base": "^6.4.10",
|
|
31
|
+
"@things-factory/integration-base": "^6.4.10",
|
|
32
32
|
"@things-factory/operato-license-checker": "^4.0.4",
|
|
33
33
|
"content-disposition": "^0.5.3",
|
|
34
34
|
"generic-pool": "^3.8.2"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"@thiagoelg/node-printer": "0.6.2",
|
|
38
38
|
"puppeteer": "^20.7.3"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "ef124bc42c95ec3466f8ee03f7cffd5318aeb20c"
|
|
41
41
|
}
|
|
@@ -15,14 +15,23 @@ import { LicenseError } from '../../errors/license-error'
|
|
|
15
15
|
@Resolver(Board)
|
|
16
16
|
export class BoardQuery {
|
|
17
17
|
@Directive('@privilege(category: "board", privilege: "query", domainOwnerGranted: true)')
|
|
18
|
-
@Query(returns => Board, { description: '
|
|
19
|
-
async board(
|
|
18
|
+
@Query(returns => Board, { description: 'Finds a single board by its ID. If cachedUpdatedAt matches, model is omitted.' })
|
|
19
|
+
async board(
|
|
20
|
+
@Arg('id') id: string,
|
|
21
|
+
@Arg('cachedUpdatedAt', { nullable: true, description: 'Client cache timestamp — if matches, model field is omitted' }) cachedUpdatedAt: string,
|
|
22
|
+
@Ctx() context: ResolverContext
|
|
23
|
+
): Promise<Board> {
|
|
20
24
|
const { domain } = context.state
|
|
21
25
|
|
|
22
26
|
var board = await getRepository(Board).findOne({
|
|
23
27
|
where: { domain: { id: In([domain.id, domain.parentId].filter(Boolean)) }, id }
|
|
24
28
|
})
|
|
25
29
|
|
|
30
|
+
// 캐시 유효성 체크: updatedAt이 동일하면 model을 생략하여 전송량 절감
|
|
31
|
+
if (board && cachedUpdatedAt && board.updatedAt?.toISOString() === cachedUpdatedAt) {
|
|
32
|
+
board.model = null
|
|
33
|
+
}
|
|
34
|
+
|
|
26
35
|
if (domain) {
|
|
27
36
|
// 1. check domainSecret is over limit quantity or not
|
|
28
37
|
var count = await getRepository(Domain)
|