Function withValidation

  • Parameters

    • __namedParameters: ValidationHoF

    Returns ((handler?: ((req: NextApiRequest, res: NextApiResponse) => any)) => ((req: NextApiRequest, res: NextApiResponse, next?: NextHandler) => Promise<any>))

      • (handler?): ((req: NextApiRequest, res: NextApiResponse, next?: NextHandler) => Promise<any>)
      • Parameters

        • Optionalhandler: ((req: NextApiRequest, res: NextApiResponse) => any)
            • (req, res): any
            • Parameters

              • req: NextApiRequest
              • res: NextApiResponse

              Returns any

        Returns ((req: NextApiRequest, res: NextApiResponse, next?: NextHandler) => Promise<any>)

          • (req, res, next?): Promise<any>
          • Parameters

            • req: NextApiRequest
            • res: NextApiResponse
            • Optionalnext: NextHandler

            Returns Promise<any>