Closed Shankhanil closed 4 years ago
Are you talking about adding new quotes?
Yes, I am introducing a feature, where an user can add new quotes to QuoteGarden
But we have to keep secure. So no one can add meaningless data.
Absolutely, what I can do is, I can post the quote data to a temporary API, where the maintainer (you) can review it and approve/reject it.
No, I trust you. You can post directly.
Yes, but I can't always trust my users. It may so happen, that the user is trying to spam, or post meaningless data. I need more ideas on how to prevent it.
I can implement API protection using JWT, so users need to log in to create new quotes.
That's a good idea. Can I work on this patch, if you're not yet working on it? I can create an issue, and a PR. If you assign this to me, could you also send me relevant sources for a quick readup on JWT authentication? @pprathameshmore
Do you know Node.js?
Yes, as a beginner.
Okay! You can! But currently facing issue https://github.com/pprathameshmore/QuoteGarden/issues/9
I will look into issue #9 .
In regards to the validity of user-added quotes, some open-source APIs usually have a feedback system that contains two buttons: like or dislike, which is usually a POST request. Another variant is just voted with each quote act as a weight to how likely this is to be randomly generated. This approach will likely be little algorithmic heavy.
We can try out the feedback-system approach.
Yes
@pprathameshmore pls have a look at the issue