Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const authGuard = require("../middlewares/authGuard");
- router.get("/search", authGuard, (req, res, next) => {
- var query = req.param("query");
- Drug.find( {name: new RegExp(query, "i")}) .then(items => {
- res.json(items);
- });
- });
Add Comment
Please, Sign In to add comment