forked from mirrors/bookwyrm
put status id in path for delete-status
This commit is contained in:
parent
7f9cc31040
commit
4297e8647d
2 changed files with 2 additions and 4 deletions
|
@ -82,9 +82,8 @@
|
|||
<div class="toggle-content hidden card-footer">
|
||||
{% if status.user == request.user %}
|
||||
<div class="card-footer-item">
|
||||
<form name="delete-{{status.id}}" action="/delete-status" method="post">
|
||||
<form name="delete-{{status.id}}" action="/delete-status/{{ status.id }}" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="status" value="{{ status.id }}">
|
||||
<button class="button is-danger is-light" type="submit">
|
||||
Delete post
|
||||
</button>
|
||||
|
|
|
@ -549,9 +549,8 @@ def unboost(request, status_id):
|
|||
|
||||
|
||||
@login_required
|
||||
def delete_status(request):
|
||||
def delete_status(request, status_id):
|
||||
''' delete and tombstone a status '''
|
||||
status_id = request.POST.get('status')
|
||||
if not status_id:
|
||||
return HttpResponseBadRequest()
|
||||
status = get_object_or_404(models.Status, id=status_id)
|
||||
|
|
Loading…
Reference in a new issue