def fingerprint_delete(request, share_id): if not request.user.is_authenticated(): raise Http404 deleteFingerprintShare(share_id) request.session['deleted_public_link'] = True request.session['created_public_link'] = False return redirect('public.views.fingerprint_list')
def post(self, request, *args, **kw): if request.user.is_authenticated(): # first we get the email parameter share_id = request.POST.get('share_id', '') deleted = deleteFingerprintShare(share_id) return Response({'deleted': deleted}, status=status.HTTP_200_OK) return Response({}, status=status.HTTP_400_BAD_REQUEST)