From 7405d884deb5ec68ea30dd7ea345d8b8fdaf2bbb Mon Sep 17 00:00:00 2001 From: sadnub Date: Thu, 17 Mar 2022 15:47:28 -0400 Subject: [PATCH] black and fix settings.py --- api/tacticalrmm/tacticalrmm/schema.py | 11 ++++++----- api/tacticalrmm/tacticalrmm/settings.py | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/api/tacticalrmm/tacticalrmm/schema.py b/api/tacticalrmm/tacticalrmm/schema.py index f41a65e6..13000de1 100644 --- a/api/tacticalrmm/tacticalrmm/schema.py +++ b/api/tacticalrmm/tacticalrmm/schema.py @@ -3,10 +3,11 @@ from drf_spectacular.extensions import OpenApiAuthenticationExtension # custom api key auth for swagger-ui class APIAuthenticationScheme(OpenApiAuthenticationExtension): target_class = "tacticalrmm.auth.APIAuthentication" # full import path OR class ref - name = 'API Key Auth' # name used in the schem + name = "API Key Auth" # name used in the schem + def get_security_definition(self, auto_schema): return { - 'type': 'apiKey', - 'in': 'header', - 'name': 'X-API-KEY', - } \ No newline at end of file + "type": "apiKey", + "in": "header", + "name": "X-API-KEY", + } diff --git a/api/tacticalrmm/tacticalrmm/settings.py b/api/tacticalrmm/tacticalrmm/settings.py index be2c5bbc..0b31c6a3 100644 --- a/api/tacticalrmm/tacticalrmm/settings.py +++ b/api/tacticalrmm/tacticalrmm/settings.py @@ -58,7 +58,7 @@ except ImportError: pass REST_FRAMEWORK = { -# "DATETIME_FORMAT": "%b-%d-%Y - %H:%M", + "DATETIME_FORMAT": "%b-%d-%Y - %H:%M", "DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.IsAuthenticated",), "DEFAULT_AUTHENTICATION_CLASSES": ( "knox.auth.TokenAuthentication", @@ -71,7 +71,7 @@ SPECTACULAR_SETTINGS = { "TITLE": "Tactical RMM API", "DESCRIPTION": "Simple and Fast remote monitoring and management tool", "VERSION": TRMM_VERSION, - 'AUTHENTICATION_WHITELIST': ["tacticalrmm.auth.APIAuthentication"], + "AUTHENTICATION_WHITELIST": ["tacticalrmm.auth.APIAuthentication"], } if not "AZPIPELINE" in os.environ: