Step 3. Upvoting the features
Step duration ~18 min
3:44
To set up a user management we are doing the following:
- Creating API-endpoint on App users(
WebUser
) data structure with conditionrole like admin
on user's session; - Creating new web-page, with Security condition on
role == admin
- Add a Table on that page.

15:08
Let's add two new fields to
Features
data structure:upvotes
, type of numberusers_upvoted_ids
, type of arrayLink→WebUser
Then, create a new page for upvoting (available for all the authorised users):

Note, that we add the new field
Upvotes
as a counter on the cards.Then, we are configuring actions:
- Add new data structure
upvotes
with the following fields:user_id
, type oflink→WebUser
;feature_id
, type oflink→Features
- Create API endpoint for adding objects to
upvotes
; - Design a scenario for counting votes (avoiding duplication!)


Add an element to users_upvoted_ids

Counting the length of users_upvoted_ids
Finally, we a sorting the cards by
upvotes
.Last modified 1yr ago