Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Findeton committed Nov 18, 2024
1 parent 31074c5 commit 2a9f223
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions iam/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
url(r'^auth-event/(?P<pk>\d+)/turnout/$', views.turnout, name='turnout'),
url(r'^auth-event/(?P<pk>[-\w]+)/live-preview/$', views.live_preview, name='live-preview'),
url(r'^auth-event/live-preview/$', views.live_preview, name='live-preview'),
url(r'^auth-event/delete-elections/$', views.delete_elections, name='delete-elections'),
url(r'^auth-event/module/$', views.authevent_module, name='authevent_module'),
url(r'^auth-event/module/(?P<name>[-\w]+)/$', views.authevent_module, name='authevent_module'),

Expand Down
22 changes: 21 additions & 1 deletion iam/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3365,4 +3365,24 @@ def get(self, request):
return json_response(dict(
highest_id=highest_pk
))
get_highest_authevent = login_required(GetHighestAutheventView.as_view())
get_highest_authevent = login_required(GetHighestAutheventView.as_view())


class DeleteElections(View):
@login_required
def post(request, pk=None):
'''
Uploads the configuration for a live preview
'''
try:
elections_json = parse_json_request(request)
election_ids = elections_json['election-ids']
except:
return json_response(
status=400,
error_codename=ErrorCodes.BAD_REQUEST)

data = {'status': 'ok'}
return json_response(data)

delete_elections = DeleteElections.as_view()

0 comments on commit 2a9f223

Please sign in to comment.