1UP : Code refractoring + trail modification and deletion
Repository
https://github.com/therealFlauwy/1UP
Following this post from @flauwy, I've been tasked to start the creation of the new 1UP.
As a reminder, @utopian-1UP was an Utopian bot front-runner in which members of the community would decide which are the best posts to vote for. the @utopian-1up would then vote for the best post every 2.4 hours, followed by hundreds of curators in the trail.
What s new?
Code refractoring
The code started to become quite heavy so I thought it was time for some refractoring, putting the routes in different files according to their use : for communities, for trails, etc.The functions are defined in utils.js and can be called from any of those routes.
Lots of work has been done on the getSession function that allows to get information about the user.
Indeed, users can be related to a community in many different ways, and we need this information. For each user we need to get :
- Which communities the user is either an admin, moderator or owner.
- Which communities the user is trailing
- Which community the user is acting as a trail tail (if any)
For reminder, what I call the trail tail, is the last account voting on the trail, the community whale.

Updating and deleting the trail
Whether being a normal trailing account or the trail tail, users can edit or remove their participation to the trail from the View page.
New PATCH and DELETE routes have been created for both the Trail and TrailTail objects.
The CSS will soon be added by @flauwy.
Administrators can also remove the trail tail from the Edit page.
Future work
- Fetch the posts the post corresponding to the community criteria
- Display these posts and allow 1UP votes on it
- Vote on the best post of the period
Live Demo
As a demonstration speaks more than lots of words, I ve put back online the old Utopian1UP website. You can try by yourself and create a community and link a trail to it for testing purposes.
No votes will be casted do not worry, but it's an offline token so, for safety reasons, I would recommend using a test account.
Pull Request
GitHub Account

Leave 1UP : Code refractoring + trail modification and deletion to:
Read more #utopian-io posts
Best Posts From Stoodkev
We have not curated any of stoodkev's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Stoodkev
- Multisig 2FA bot (Beta)
- Hive Multisig Continuation Proposal - Decentralization, 2FA, Key granularity and Oboarding
- Hive Multisig SDK Documentation
- Hive Multisig is live!
- Hive Multisig - May Progress Report
- Hive Multisig Progress Report
- Sri Lanka Rickshaw (Tuktuk) Run - Day #7 - reaching the finish line
- Sri Lanka Rickshaw (Tuktuk) Run - Day #7 - reaching the finish line
- Sri Lanka Rickshaw (Tuktuk) Run - Day #6 - Safari in Yala National Park
- Sri Lanka Rickshaw (Tuktuk) Run - Day #5