Giter Site home page Giter Site logo

Comments (7)

raxraj avatar raxraj commented on July 17, 2024 3

@lukePeavey,
First of all, I like this so much, I use it almost every time that I could.
Is this still open? I am up for this.

from quotable.

raxraj avatar raxraj commented on July 17, 2024 2

@lukePeavey @lein1013 , Awesome,
I'll get right on it.

from quotable.

lukePeavey avatar lukePeavey commented on July 17, 2024 1

If you would like to submit a PR for this, please feel free. If not, I can do it next weekend.

const { minLength, maxLength, tags } = req.query
const filter = {}

Add additional params

-const { minLength, maxLength, tags } = req.query
+const { minLength, maxLength, tags, author, authorId } = req.query

Add the filters for author and/or authorId

if (authorId) {
  filter.authorId = { $in: authorId.split('|') }
}

if (author) {
  filter.author = { $in: author.split('|') }
}

from quotable.

lukePeavey avatar lukePeavey commented on July 17, 2024

That's a good idea. We can definitely do that

from quotable.

lukePeavey avatar lukePeavey commented on July 17, 2024

One thought....

The tags param takes a comma separated list, which translates to an AND query (with "tag-one" AND "tag-two"), or a | separated list, which translates to an OR query (with "tag-one" OR "tag-two").

For consistency, would it make sense for this param to take a | separated list since its an OR query (by "author-one" OR "author-two").

Let me know what you think.

from quotable.

lein1013 avatar lein1013 commented on July 17, 2024

Nothing done from my side, but I would be happy to see this feature soon :-)

from quotable.

lukePeavey avatar lukePeavey commented on July 17, 2024

@raxraj did you want to work on this? If so it's all yours

from quotable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.