• This middleware will validate the request body using zod schema

    Author

    aayushchugh

    Parameters

    • schema: AnyZodObject

      schema created using zod

    Returns ((req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => void | Response<any, Record<string, any>>)

      • (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction): void | Response<any, Record<string, any>>
      • Parameters

        • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
        • res: Response<any, Record<string, any>>
        • next: NextFunction

        Returns void | Response<any, Record<string, any>>

Generated using TypeDoc