Merge pull request #2769 from SchrodingersGat/api-endpoint

Add 'plugins_enabled' information to the root API endpoint
This commit is contained in:
Oliver 2022-03-24 20:48:25 +11:00 committed by GitHub
commit fd03db4363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -6,6 +6,7 @@ Main JSON interface views
from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.http import JsonResponse
from django_filters.rest_framework import DjangoFilterBackend
@ -37,6 +38,7 @@ class InfoView(AjaxView):
'instance': inventreeInstanceName(),
'apiVersion': inventreeApiVersion(),
'worker_running': is_worker_running(),
'plugins_enabled': settings.PLUGINS_ENABLED,
}
return JsonResponse(data)

View File

@ -12,11 +12,14 @@ import common.models
INVENTREE_SW_VERSION = "0.7.0 dev"
# InvenTree API version
INVENTREE_API_VERSION = 32
INVENTREE_API_VERSION = 33
"""
Increment this API version number whenever there is a significant change to the API that any clients need to know about
v33 -> 2022-03-24
- Adds "plugins_enabled" information to root API endpoint
v32 -> 2022-03-19
- Adds "parameters" detail to Part API endpoint (use &parameters=true)
- Adds ability to filter PartParameterTemplate API by Part instance