We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The regex filter doesn't work properly. The example in README may not be updated.
My code:
const express = require('express') const bodyParser= require('body-parser') const app = express() const mongoose = require('mongoose') const actions = require('mongoose-rest-actions') const mquery = require('express-mquery') // Configurations mongoose.plugin(actions) app.use(express.json()) app.use(bodyParser.urlencoded({ extended: true })) app.use(mquery({ limit: 1000, maxLimit: 10000 })); mongoose.connect('mongodb://localhost:27017/user-db', { useNewUrlParser: true, useUnifiedTopology: true}) //model const Schema = mongoose.Schema const Model = mongoose.model const userSchema = new Schema({ name: { type: String, required: true } }) const User = new Model('User', userSchema) //routes app.get('/user', async (req, res) =>{ const options = req.mquery User.get(options, (error, result) => { if (error){ res.status(500).send(error) }else{ res.status(202).send(result) } }) }) app.listen(3000)
The test:
GET /user?query={"name":{"$regex":"/Bo$/"}}
The text was updated successfully, but these errors were encountered:
Hello, can we make a request with LIKE and Case Insensitive ?
Sorry, something went wrong.
lykmapipo
No branches or pull requests
The regex filter doesn't work properly. The example in README may not be updated.
My code:
The test:
The text was updated successfully, but these errors were encountered: