formatting

This commit is contained in:
sadnub
2021-11-15 21:17:28 -05:00
parent 685084e784
commit 56e0e5cace
2 changed files with 11 additions and 7 deletions

View File

@@ -65,13 +65,13 @@ REST_FRAMEWORK = {
"knox.auth.TokenAuthentication",
"tacticalrmm.auth.APIAuthentication",
),
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema'
"DEFAULT_SCHEMA_CLASS": "drf_spectacular.openapi.AutoSchema",
}
SPECTACULAR_SETTINGS = {
'TITLE': 'Tactical RMM API',
'DESCRIPTION': 'Simple and Fast remote monitoring and management tool',
'VERSION': TRMM_VERSION,
"TITLE": "Tactical RMM API",
"DESCRIPTION": "Simple and Fast remote monitoring and management tool",
"VERSION": TRMM_VERSION,
}
if not "AZPIPELINE" in os.environ:

View File

@@ -1,7 +1,7 @@
from django.conf import settings
from django.urls import include, path, register_converter
from knox import views as knox_views
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
from accounts.views import CheckCreds, LoginView
from core.consumers import DashInfo
@@ -38,8 +38,12 @@ urlpatterns = [
path("scripts/", include("scripts.urls")),
path("alerts/", include("alerts.urls")),
path("accounts/", include("accounts.urls")),
path('api/schema/', SpectacularAPIView.as_view(), name='schema'),
path('api/schema/swagger-ui/', SpectacularSwaggerView.as_view(url_name='schema'), name='swagger-ui'),
path("api/schema/", SpectacularAPIView.as_view(), name="schema"),
path(
"api/schema/swagger-ui/",
SpectacularSwaggerView.as_view(url_name="schema"),
name="swagger-ui",
),
]
if hasattr(settings, "ADMIN_ENABLED") and settings.ADMIN_ENABLED: