diff --git a/applications/visualizer/backend/api/api.py b/applications/visualizer/backend/api/api.py index d66f6a20..96c67b50 100644 --- a/applications/visualizer/backend/api/api.py +++ b/applications/visualizer/backend/api/api.py @@ -26,6 +26,7 @@ from .services.connectivity import query_nematode_connections from .authenticators.basic_auth_super_user import basic_auth_superuser + class ErrorMessage(Schema): detail: str diff --git a/applications/visualizer/backend/api/authenticators/basic_auth_super_user.py b/applications/visualizer/backend/api/authenticators/basic_auth_super_user.py index cb124808..daf6b50b 100644 --- a/applications/visualizer/backend/api/authenticators/basic_auth_super_user.py +++ b/applications/visualizer/backend/api/authenticators/basic_auth_super_user.py @@ -9,5 +9,6 @@ def authenticate(self, request, username, password): if user and user.is_superuser: # Ensure the user is a superuser return user return None - -basic_auth_superuser = BasicAuthSuperUser() \ No newline at end of file + + +basic_auth_superuser = BasicAuthSuperUser() diff --git a/applications/visualizer/backend/api/decorators/streaming.py b/applications/visualizer/backend/api/decorators/streaming.py index 4840ed46..b20ad59e 100644 --- a/applications/visualizer/backend/api/decorators/streaming.py +++ b/applications/visualizer/backend/api/decorators/streaming.py @@ -5,6 +5,7 @@ from functools import wraps from django.http import StreamingHttpResponse + def with_stdout_streaming(func): """ A decorator that: @@ -12,6 +13,7 @@ def with_stdout_streaming(func): - Captures anything it prints to stdout, - Streams that output asynchronously line-by-line as it's produced. """ + @wraps(func) def wrapper(request, *args, **kwargs): q = Queue()