UNPKG

simple-auth-cli

Version:

An implementation of authentication system supporting multiple providers ready to be used with a single command.

7 lines 271 B
import {Request,Response,NextFunction} from 'express'; const asyncHandler=(requestHandler:Function)=>{ return (req:Request,res:Response,next:NextFunction)=>{ Promise.resolve(requestHandler(req,res,next)).catch((err)=>next(err)); } } export default asyncHandler;