Skip to content

Commit

Permalink
Merge pull request #30 from nens/csrf_exempt
Browse files Browse the repository at this point in the history
added csrf exempt
  • Loading branch information
JJFlorian authored Apr 5, 2024
2 parents 00f29b5 + a3efd5b commit 9798c8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from django.contrib.auth import logout
from django.contrib.auth.models import User
from django.shortcuts import redirect
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import generics, permissions, status, views, viewsets
from rest_framework.decorators import action
Expand Down Expand Up @@ -136,6 +138,7 @@ def get(self, request, *args, **kwargs):
"""List of all Import Tasks."""
return self.list(request, *args, **kwargs)

@method_decorator(csrf_exempt)
def post(self, request):
"""
Initialize an import task by posting a BRO object.
Expand Down Expand Up @@ -225,6 +228,7 @@ def get(self, request, *args, **kwargs):
"""List of all Upload Tasks."""
return self.list(request, *args, **kwargs)

@method_decorator(csrf_exempt)
def post(self, request):
"""
Initialize an upload task by posting the bro_domain, registration_type, request_type, and the sourcedocument_data
Expand Down

0 comments on commit 9798c8f

Please sign in to comment.