fix: 404 response on wrong api calls

This commit is contained in:
AdrienLSH
2024-01-18 12:41:29 +01:00
parent dee71c7c8d
commit dae01c6821
2 changed files with 10 additions and 1 deletions

7
transcendence/views.py Normal file
View File

@ -0,0 +1,7 @@
from rest_framework.response import Response
from rest_framework.decorators import api_view
from rest_framework import status
@api_view(('GET',))
def handler_404_view(request):
return Response(status=status.HTTP_404_NOT_FOUND);