Skip to content

Commit e471385

Browse files
committed
Add api_view decorator #504
Signed-off-by: Jono Yang <[email protected]>
1 parent bc7411b commit e471385

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

minecode/api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from packageurl import PackageURL
2222
from rest_framework import serializers, status, viewsets
23-
from rest_framework.decorators import action
23+
from rest_framework.decorators import action, api_view
2424
from rest_framework.permissions import IsAdminUser
2525
from rest_framework.response import Response
2626

@@ -350,7 +350,7 @@ def statistics(self, request, *args, **kwargs):
350350
response = ScannableURI.objects.statistics()
351351
return Response(response)
352352

353-
353+
@api_view(['POST'])
354354
@require_POST
355355
@csrf_exempt
356356
def send_scan_notification(request, key):

0 commit comments

Comments
 (0)