@cofondateurauchomage/libs 1.1.131 → 1.1.132
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/build/api.validate.js +2 -3
- package/package.json +1 -1
package/build/api.validate.js
CHANGED
|
@@ -212,13 +212,12 @@ function validateBodyForO(route, body) {
|
|
|
212
212
|
if (typeof body !== "object" || body === null) {
|
|
213
213
|
throw new ValidationError(400, "Le payload est requis");
|
|
214
214
|
}
|
|
215
|
-
const cleanedBody = (0, utils_1.cleanObject)(body, { keepNull: true, keepEmptyArrays: true });
|
|
216
215
|
const schema = schemasForAllRoutes[route];
|
|
217
|
-
const parsed = schema.safeParse(
|
|
216
|
+
const parsed = schema.safeParse(body);
|
|
218
217
|
if (!parsed.success) {
|
|
219
218
|
throwFromZodError(parsed.error);
|
|
220
219
|
}
|
|
221
|
-
const input =
|
|
220
|
+
const input = body;
|
|
222
221
|
const result = {};
|
|
223
222
|
for (const key of Object.keys(schema.shape)) {
|
|
224
223
|
if (input[key] !== undefined) {
|