Skip to content

Instantly share code, notes, and snippets.

@appletreeat56
Last active October 25, 2022 14:26
Show Gist options
  • Save appletreeat56/91cd36ef94bda8813ef18f5b81dfddfe to your computer and use it in GitHub Desktop.
Save appletreeat56/91cd36ef94bda8813ef18f5b81dfddfe to your computer and use it in GitHub Desktop.
import { checkSchema } from 'express-validator'
import { charitySchema } from '../schemas/chaity-schema'
router.post(
'/',
checkSchema(charitySchema),
async (req: Request, res: Response, next: NextFunction) => {
//Add business logic after validation
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment