UNPKG

@sentzunhat/zacatl

Version:

A modular, high-performance TypeScript microservice framework for Node.js, featuring layered architecture, dependency injection, and robust validation for building scalable APIs and distributed systems.

16 lines 567 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.applyZodSchema = void 0; const applyZodSchema = async (schema, req) => { if (schema == null) return; const s = schema; if (s.body != null) req.body = await s.body.parseAsync(req.body); if (s.querystring != null) req.query = (await s.querystring.parseAsync(req.query)); if (s.params != null) req.params = (await s.params.parseAsync(req.params)); }; exports.applyZodSchema = applyZodSchema; //# sourceMappingURL=schema-helper.js.map