#31 API POST Intervention
* adds support for proper POST of intervention * makes /<id> optional (required for Post)
This commit is contained in:
@@ -8,6 +8,7 @@ Created on: 21.01.22
|
||||
|
||||
from django.http import JsonResponse
|
||||
from django.views import View
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
|
||||
from api.models import APIUserToken
|
||||
from api.settings import KSP_TOKEN_HEADER_IDENTIFIER
|
||||
@@ -36,6 +37,7 @@ class AbstractModelAPIView(View):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.serializer = self.serializer()
|
||||
|
||||
@csrf_exempt
|
||||
def dispatch(self, request, *args, **kwargs):
|
||||
try:
|
||||
# Fetch the proper user from the given request header token
|
||||
|
||||
Reference in New Issue
Block a user