@tsq/check-id
v1.0.3
Published
a middleware to check mongo ID
Downloads
3
Readme
check-id
a express middleware for checking mongo ID
Install
npm i @tsq/check-id
Usage
const express = require('express');
const checkId = require('@tsq/check-id');
const User = require('../model/User');
const app = express();
app.get('/user/:id', checkId(User), async(req, res) => {});
Dependencies
- tsq-a/express-response