@things-factory/code-base 10.1.303 → 10.1.304
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.
|
@@ -39,13 +39,13 @@ let CommonCodeQuery = class CommonCodeQuery {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
async domain(commonCode) {
|
|
42
|
-
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: commonCode.domainId });
|
|
42
|
+
return commonCode.domainId ? await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: commonCode.domainId }) : null;
|
|
43
43
|
}
|
|
44
44
|
async updater(commonCode) {
|
|
45
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: commonCode.updaterId });
|
|
45
|
+
return commonCode.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: commonCode.updaterId }) : null;
|
|
46
46
|
}
|
|
47
47
|
async creator(commonCode) {
|
|
48
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: commonCode.creatorId });
|
|
48
|
+
return commonCode.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: commonCode.creatorId }) : null;
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
exports.CommonCodeQuery = CommonCodeQuery;
|
|
@@ -30,7 +30,7 @@ let CommonCodeDetailQuery = class CommonCodeDetailQuery {
|
|
|
30
30
|
return { items, total };
|
|
31
31
|
}
|
|
32
32
|
async commonCode(commonCodeDetail) {
|
|
33
|
-
return await (0, shell_1.getRepository)(common_code_1.CommonCode).findOneBy({ id: commonCodeDetail.commonCodeId });
|
|
33
|
+
return commonCodeDetail.commonCodeId ? await (0, shell_1.getRepository)(common_code_1.CommonCode).findOneBy({ id: commonCodeDetail.commonCodeId }) : null;
|
|
34
34
|
}
|
|
35
35
|
async description(commonCodeDetail, context) {
|
|
36
36
|
const { lng } = context.state;
|
|
@@ -38,13 +38,13 @@ let CommonCodeDetailQuery = class CommonCodeDetailQuery {
|
|
|
38
38
|
return (lng && labels && labels[lng]) || description;
|
|
39
39
|
}
|
|
40
40
|
async domain(commonCodeDetail) {
|
|
41
|
-
return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: commonCodeDetail.domainId });
|
|
41
|
+
return commonCodeDetail.domainId ? await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: commonCodeDetail.domainId }) : null;
|
|
42
42
|
}
|
|
43
43
|
async updater(commonCodeDetail) {
|
|
44
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: commonCodeDetail.updaterId });
|
|
44
|
+
return commonCodeDetail.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: commonCodeDetail.updaterId }) : null;
|
|
45
45
|
}
|
|
46
46
|
async creator(commonCodeDetail) {
|
|
47
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: commonCodeDetail.creatorId });
|
|
47
|
+
return commonCodeDetail.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: commonCodeDetail.creatorId }) : null;
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
exports.CommonCodeDetailQuery = CommonCodeDetailQuery;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/code-base",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.304",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "dist-client/index.js",
|
|
6
6
|
"files": [
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@operato/graphql": "^10.0.0",
|
|
45
|
-
"@things-factory/auth-base": "^10.1.
|
|
46
|
-
"@things-factory/shell": "^10.1.
|
|
45
|
+
"@things-factory/auth-base": "^10.1.304",
|
|
46
|
+
"@things-factory/shell": "^10.1.304"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "76ce38519069ba90190d69d2a9d6c130bc981cf0"
|
|
49
49
|
}
|