@eeplatform/core 1.8.1 → 1.8.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eeplatform/core
2
2
 
3
+ ## 1.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - a51c5b5: Update PSDGC get all query
8
+
3
9
  ## 1.8.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -7216,11 +7216,11 @@ function usePSGCRepo() {
7216
7216
  }
7217
7217
  }
7218
7218
  async function getByName({ name, prefix = "", type = "" } = {}) {
7219
- const query = { $text: { $search: name } };
7220
- const cacheKeyOptions = { name };
7221
- if (["City", "Mun"].includes(type)) {
7222
- query.type = { $in: ["City", "Mun"] };
7223
- cacheKeyOptions.type = type;
7219
+ const query = { $text: { $search: name }, type };
7220
+ const cacheKeyOptions = { name, type };
7221
+ const _types = ["City", "Mun"];
7222
+ if (_types.includes(type)) {
7223
+ query.type = { $in: _types };
7224
7224
  }
7225
7225
  if (prefix) {
7226
7226
  query.code = { $regex: `^${prefix}` };