@7365admin1/core 3.52.2-staging.240 → 3.52.2-staging.241

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.
@@ -0,0 +1,9 @@
1
+ ---
2
+ "@7365admin1/core": patch
3
+ ---
4
+
5
+ `GET /api/people/plateNumber/:plateNumber` now hides plates whose vehicle has been deleted, like the other person reads.
6
+
7
+ Its own filter is `status: { $ne: "deleted" }` on the **person**, which is unrelated to the vehicle — reading that line as "deleted plates are excluded" is why this endpoint was missed when the other two were fixed. It has no caller in the estate today, but it is routed and behind `requireAuth`, so an authenticated caller gets the resident's whole `plates[]` array back. The filter runs on read, after the cache, because whether a plate's vehicle is deleted can change inside the 15-minute TTL.
8
+
9
+ `getPersonByPlateNumber` (no caller, no route) and `getApprovedPersonByPlateNumber` (a record-matching path inside `person.service.ts`, not a display path) are deliberately left alone.
package/dist/index.js CHANGED
@@ -18130,7 +18130,7 @@ function usePersonRepo() {
18130
18130
  const cacheData = await getCache(cacheKey);
18131
18131
  if (cacheData) {
18132
18132
  import_node_server_utils41.logger.info(`Cache hit for key: ${cacheKey}`);
18133
- return cacheData;
18133
+ return await withoutDeletedPlates(cacheData);
18134
18134
  }
18135
18135
  const data = await collection.find(
18136
18136
  { "plates.plateNumber": plateNumber, status: { $ne: "deleted" } },
@@ -18141,7 +18141,7 @@ function usePersonRepo() {
18141
18141
  }).catch((err) => {
18142
18142
  import_node_server_utils41.logger.error(`Failed to set cache for key: ${cacheKey}`, err);
18143
18143
  });
18144
- return data;
18144
+ return await withoutDeletedPlates(data);
18145
18145
  } catch (error) {
18146
18146
  throw new import_node_server_utils41.InternalServerError("Failed to fetch people by plate number.");
18147
18147
  }