chore(api): document version endpoint
This commit is contained in:
parent
0e3ede5a1a
commit
1f7c2fa0ab
8 changed files with 40 additions and 15 deletions
14
api/libretime_api/core/views/info.py
Normal file
14
api/libretime_api/core/views/info.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
from django.conf import settings
|
||||
from rest_framework.permissions import AllowAny
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
|
||||
from ..serializers import VersionSerializer
|
||||
|
||||
|
||||
class VersionView(APIView):
|
||||
permission_classes = [AllowAny]
|
||||
serializer_class = VersionSerializer
|
||||
|
||||
def get(self, request):
|
||||
return Response({"api_version": settings.API_VERSION})
|
Loading…
Add table
Add a link
Reference in a new issue