MCPcopy Create free account
hub / github.com/dexisback/backend-101 / asyncHandler

Function asyncHandler

auth/src/utils/asyncHandler.ts:16–20  ·  view source on GitHub ↗
(fn: AsyncFunction)

Source from the content-addressed store, hash-verified

14
15
16export const asyncHandler = (fn: AsyncFunction) => {
17 return (req: Request, res: Response, next: NextFunction) => {
18 Promise.resolve(fn(req, res, next).catch(next))
19 }
20}
21
22export const authService = {
23 //register a new user:

Callers 1

auth.routes.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected