sintonia/api/libretime_api/core/views/version.py

11 lines
345 B
Python

from django.conf import settings
from rest_framework.decorators import api_view, permission_classes
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
@api_view(["GET"])
@permission_classes((AllowAny,))
def version(request, *args, **kwargs):
return Response({"api_version": settings.API_VERSION})