Skip to content

Commit

Permalink
Add api_view decorator #504
Browse files Browse the repository at this point in the history
Signed-off-by: Jono Yang <[email protected]>
  • Loading branch information
JonoYang committed Jul 31, 2024
1 parent bc7411b commit e471385
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions minecode/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

from packageurl import PackageURL
from rest_framework import serializers, status, viewsets
from rest_framework.decorators import action
from rest_framework.decorators import action, api_view
from rest_framework.permissions import IsAdminUser
from rest_framework.response import Response

Expand Down Expand Up @@ -350,7 +350,7 @@ def statistics(self, request, *args, **kwargs):
response = ScannableURI.objects.statistics()
return Response(response)


@api_view(['POST'])
@require_POST
@csrf_exempt
def send_scan_notification(request, key):
Expand Down

0 comments on commit e471385

Please sign in to comment.