This is an automated email from the ASF dual-hosted git repository.

gstein pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/steve.git

commit 5202a97f81de4242e57fcc5e26c729d7b9224362
Author: Greg Stein <[email protected]>
AuthorDate: Sat Oct 11 12:19:16 2025 -0500

    Add some endpoints for issue management.
---
 v3/server/pages.py | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/v3/server/pages.py b/v3/server/pages.py
index a55a7f0..058b720 100644
--- a/v3/server/pages.py
+++ b/v3/server/pages.py
@@ -239,6 +239,57 @@ async def do_close_endpoint(election):
     return quart.redirect(f'/manage/{election.eid}')
 
 
[email protected]('/do-add-issue/<eid>')
[email protected]({R.committer})  ### need general solution
+@load_election
+async def do_add_issue_endpoint(election):
+    result = await signin_info()
+
+    ### check authz
+
+    ### do stuff
+
+    _LOGGER.info(f'User[U:{result.uid}] added issue[I:{iid}]'
+                 f' to election[E:{election.eid}]')
+
+    # Return to the management page for this Election.
+    return quart.redirect(f'/manage/{election.eid}')
+
+
[email protected]('/do-edit-issue/<eid>/<iid>')
[email protected]({R.committer})  ### need general solution
+###@load_election_issue
+async def do_edit_issue_endpoint(election, issue):
+    result = await signin_info()
+
+    ### check authz
+
+    ### do stuff
+
+    _LOGGER.info(f'User[U:{result.uid}] edited issue[I:{issue.iid}]'
+                 f' in election[E:{election.eid}]')
+
+    # Return to the management page for this Election.
+    return quart.redirect(f'/manage/{election.eid}')
+
+
[email protected]('/do-delete-issue/<eid>/<iid>')
[email protected]({R.committer})  ### need general solution
+###@load_election_issue
+async def do_delete_issue_endpoint(election, issue):
+    result = await signin_info()
+
+    ### check authz
+
+    ### do stuff
+
+    _LOGGER.info(f'User[U:{result.uid}] deleted issue[I:{issue.iid}]'
+                 f' from election[E:{election.eid}]')
+
+    # Return to the management page for this Election.
+    return quart.redirect(f'/manage/{election.eid}')
+
+
 @APP.get('/profile')
 @asfquart.auth.require  # Bare decorator means just require a valid session
 @APP.use_template(TEMPLATES / 'profile.ezt')

Reply via email to