Task #12217
Updated by Andrej Ondrejovic almost 2 years ago
- create form available for admins where he can create a poll - admin will select name(description), start/end date, order, options and upload an image for poll - options is little bit tricky as the admin has to select key name and then a label, key name is used by backend to recalculate votes it can not contains spaces and special chars all letters should be lower case(validation), label is shown on website https://devapi.qorpo.world/#/Voting https://devapi.qorpo.world/#/Voting example body ``` { "start_at": "2023-07-26T08:57:53.962Z", "end_at": "2023-07-28T08:57:53.962Z", "custom_order": 1, "description": "onan pooool", "public_vote": false, "hidden_result": false, "poll_style": "SINGLE", "poll_eligibility": "OPEN", "poll_evaluation": "FAIR", "options": {"ccash": {"label": "Yes", "design": "simple"}, "colorful"}, "qorpo": {"label": "No", "design": "simple"}} } ``` these values are static, so far ``` "public_vote": false, "hidden_result": false, "poll_style": "SINGLE", "poll_eligibility": "OPEN", "poll_evaluation": "FAIR", ``` ``` "description": "onan pooool", ``` description is basically name of the pool shown on website ``` yaml "description": "onan pooool", "options": {"ccash": {"label": "Yes", "design": "colorful"}, "qorpo": {"label": "No", "design": "simple"}} ``` ccash key has to be lower case without spaces and special chars and is used for votes calculation label is shown on website, ``` yaml "options": {"ccash": {"label": "Yes", "design": "simple"}, "qorpo": {"label": "No", "design": "simple"}} ``` another example of options ``` {"ep": {"label": "Esports Pass", "design": "simple"}, "cca": {"label": "Citizen Conflict Access", "design": "simple"}, "hrv": {"label": "High Rarity Value", "design": "simple"}, "airdrop": {"label": "$QORPO Airdrop Chance", "design": "simple"}} ```