@things-factory/geography 10.1.303 → 10.1.314
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/dist-server/service/geo-area/geo-area-query.js +3 -3
- package/dist-server/service/geo-city/geo-city-query.js +4 -4
- package/dist-server/service/geo-continent/geo-continent-query.js +2 -2
- package/dist-server/service/geo-country/geo-country-query.js +3 -3
- package/dist-server/service/geo-state/geo-state-query.js +3 -3
- package/package.json +4 -4
|
@@ -45,13 +45,13 @@ let GeoAreaQuery = class GeoAreaQuery {
|
|
|
45
45
|
return result;
|
|
46
46
|
}
|
|
47
47
|
async geoCity(geoArea) {
|
|
48
|
-
return await (0, shell_1.getRepository)(geo_city_1.GeoCity).findOneBy({ id: geoArea.geoCityId });
|
|
48
|
+
return geoArea.geoCityId ? await (0, shell_1.getRepository)(geo_city_1.GeoCity).findOneBy({ id: geoArea.geoCityId }) : null;
|
|
49
49
|
}
|
|
50
50
|
async updater(geoArea) {
|
|
51
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoArea.updaterId });
|
|
51
|
+
return geoArea.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoArea.updaterId }) : null;
|
|
52
52
|
}
|
|
53
53
|
async creator(geoArea) {
|
|
54
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoArea.creatorId });
|
|
54
|
+
return geoArea.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoArea.creatorId }) : null;
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
exports.GeoAreaQuery = GeoAreaQuery;
|
|
@@ -21,16 +21,16 @@ let GeoCityQuery = class GeoCityQuery {
|
|
|
21
21
|
return { items, total };
|
|
22
22
|
}
|
|
23
23
|
async geoCountry(geoCity) {
|
|
24
|
-
return await (0, shell_1.getRepository)(geo_country_1.GeoCountry).findOneBy({ id: geoCity.geoCountryId });
|
|
24
|
+
return geoCity.geoCountryId ? await (0, shell_1.getRepository)(geo_country_1.GeoCountry).findOneBy({ id: geoCity.geoCountryId }) : null;
|
|
25
25
|
}
|
|
26
26
|
async geoState(geoCity) {
|
|
27
|
-
return await (0, shell_1.getRepository)(geo_state_1.GeoState).findOneBy({ id: geoCity.geoStateId });
|
|
27
|
+
return geoCity.geoStateId ? await (0, shell_1.getRepository)(geo_state_1.GeoState).findOneBy({ id: geoCity.geoStateId }) : null;
|
|
28
28
|
}
|
|
29
29
|
async updater(geoCity) {
|
|
30
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoCity.updaterId });
|
|
30
|
+
return geoCity.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoCity.updaterId }) : null;
|
|
31
31
|
}
|
|
32
32
|
async creator(geoCity) {
|
|
33
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoCity.creatorId });
|
|
33
|
+
return geoCity.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoCity.creatorId }) : null;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
exports.GeoCityQuery = GeoCityQuery;
|
|
@@ -19,10 +19,10 @@ let GeoContinentQuery = class GeoContinentQuery {
|
|
|
19
19
|
return { items, total };
|
|
20
20
|
}
|
|
21
21
|
async updater(geoContinent) {
|
|
22
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoContinent.updaterId });
|
|
22
|
+
return geoContinent.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoContinent.updaterId }) : null;
|
|
23
23
|
}
|
|
24
24
|
async creator(geoContinent) {
|
|
25
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoContinent.creatorId });
|
|
25
|
+
return geoContinent.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoContinent.creatorId }) : null;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
exports.GeoContinentQuery = GeoContinentQuery;
|
|
@@ -24,13 +24,13 @@ let GeoCountryQuery = class GeoCountryQuery {
|
|
|
24
24
|
return { items, total };
|
|
25
25
|
}
|
|
26
26
|
async geoContinent(geoCountry) {
|
|
27
|
-
return await (0, shell_1.getRepository)(geo_continent_1.GeoContinent).findOneBy({ id: geoCountry.geoContinentId });
|
|
27
|
+
return geoCountry.geoContinentId ? await (0, shell_1.getRepository)(geo_continent_1.GeoContinent).findOneBy({ id: geoCountry.geoContinentId }) : null;
|
|
28
28
|
}
|
|
29
29
|
async updater(geoCountry) {
|
|
30
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoCountry.updaterId });
|
|
30
|
+
return geoCountry.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoCountry.updaterId }) : null;
|
|
31
31
|
}
|
|
32
32
|
async creator(geoCountry) {
|
|
33
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoCountry.creatorId });
|
|
33
|
+
return geoCountry.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoCountry.creatorId }) : null;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
exports.GeoCountryQuery = GeoCountryQuery;
|
|
@@ -20,13 +20,13 @@ let GeoStateQuery = class GeoStateQuery {
|
|
|
20
20
|
return { items, total };
|
|
21
21
|
}
|
|
22
22
|
async geoCountry(geoState) {
|
|
23
|
-
return await (0, shell_1.getRepository)(geo_country_1.GeoCountry).findOneBy({ id: geoState.geoCountryId });
|
|
23
|
+
return geoState.geoCountryId ? await (0, shell_1.getRepository)(geo_country_1.GeoCountry).findOneBy({ id: geoState.geoCountryId }) : null;
|
|
24
24
|
}
|
|
25
25
|
async updater(geoState) {
|
|
26
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoState.updaterId });
|
|
26
|
+
return geoState.updaterId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoState.updaterId }) : null;
|
|
27
27
|
}
|
|
28
28
|
async creator(geoState) {
|
|
29
|
-
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoState.creatorId });
|
|
29
|
+
return geoState.creatorId ? await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: geoState.creatorId }) : null;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
exports.GeoStateQuery = GeoStateQuery;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/geography",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.314",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.ts",
|
|
6
6
|
"files": [
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create ./server/migrations/migration"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@things-factory/auth-base": "^10.1.
|
|
41
|
-
"@things-factory/shell": "^10.1.
|
|
40
|
+
"@things-factory/auth-base": "^10.1.314",
|
|
41
|
+
"@things-factory/shell": "^10.1.304"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "8d74df0a0618131ff17309638a6aa0affbd4c77d"
|
|
44
44
|
}
|