@7365admin1/core 3.59.0 → 3.59.1

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/index.mjs CHANGED
@@ -58210,6 +58210,15 @@ function useGuestManagementController() {
58210
58210
  import Joi71 from "joi";
58211
58211
  import { BadRequestError as BadRequestError127, logger as logger98 } from "@7365admin1/node-server-utils";
58212
58212
  import { NotFoundError as NotFoundError37, UnauthorizedError as UnauthorizedError14 } from "@7365admin1/node-server-utils";
58213
+
58214
+ // src/utils/self-signup-files.util.ts
58215
+ function dropUnsentFiles(body) {
58216
+ if (!Array.isArray(body?.files))
58217
+ return body;
58218
+ return { ...body, files: body.files.filter((file) => file?.id) };
58219
+ }
58220
+
58221
+ // src/controllers/person.controller.ts
58213
58222
  function usePersonController() {
58214
58223
  const {
58215
58224
  getAll: _getAll,
@@ -58248,7 +58257,8 @@ function usePersonController() {
58248
58257
  return actor;
58249
58258
  }
58250
58259
  async function addResidentSelfSignUp(req, res, next) {
58251
- const { error, value } = schemaResidentSelfSignUp.validate(req.body, {
58260
+ const body = dropUnsentFiles(req.body);
58261
+ const { error, value } = schemaResidentSelfSignUp.validate(body, {
58252
58262
  abortEarly: false,
58253
58263
  stripUnknown: true
58254
58264
  });