Grouping the suggestions by number of 1UP Votes
As you may know, I am teaming up with @flauwy to build the Utopian 1UP button that will allow a goud amount of curation rewards for those following the trail to frontrun the best contributions on Utopian.
After my last iteration, @flauwy that he would rather have the suggestions grouped by number of 1UP votes, than a list of every vote ever made.
Implementing this was a bit trickier than it sounds since I am using Parse Server in the backend and it wants to add each vote received as a new Object in the Suggestion Collection. Thankfully, I learned to use the Cloud within Parse to perform this operation. What is actually happening:
- In the BeforeSave function, I check if there is already a Suggestion with the same Url
- If no, create a new Suggestion
- If yes, create a new Suggestion and add the previous voters for this url, then delete the old suggestion
I also added a mechanism to reject double upvote from the same person on the same url:
... and sorted the suggestions by number of upvotes without displaying them:
You can check it out on Heroku here, and find the merged Pull Request in here.
Posted on Utopian.io - Rewarding Open Source Contributors



Thank you for the contribution. It has been approved.
I love what you guys are doing here - keep up the great work!
You can contact us on Discord.
[utopian-moderator]
Will do! Thank you :)
You've got a
1UPfrom the @utopian-1up curation trail. 43 Utopians have upvoted your quality contribution to the open source community.Join 1UP for better posts and high curation rewards.1UP is neither organized nor endorsed by Utopian.io!
I will follow this trail as soon as I get to my laptop n.n it is becoming really interesting :)
Welcome aboard
Thanks for the information
Hey @stoodkev I am @utopian-io. I have just upvoted you!
Achievements
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Thanks!
You have (8) of reputation and still sending BS comments, will you get it at some point?
Unfortunately, I don't think this kind of thing will ever end. It is too trivial to make a new account if your rep drops too low...
Yea, I just wish new users could understand they won t get any profit this way..