From 3cae7055a198d8a0c8b101c7a5a178329fb43a36 Mon Sep 17 00:00:00 2001 From: jasquat Date: Thu, 12 Jan 2023 11:32:52 -0500 Subject: [PATCH] a little more cleanup w/ burnettk --- src/spiffworkflow_backend/config/default.py | 4 +--- src/spiffworkflow_backend/routes/health_controller.py | 8 ++------ src/spiffworkflow_backend/routes/user.py | 4 ---- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/spiffworkflow_backend/config/default.py b/src/spiffworkflow_backend/config/default.py index 763474e0..9027347c 100644 --- a/src/spiffworkflow_backend/config/default.py +++ b/src/spiffworkflow_backend/config/default.py @@ -38,9 +38,7 @@ OPEN_ID_SERVER_URL = environ.get( # OPEN_ID_SERVER_URL = environ.get("OPEN_ID_SERVER_URL", default="http://localhost:7000/openid") OPEN_ID_CLIENT_ID = environ.get("OPEN_ID_CLIENT_ID", default="spiffworkflow-backend") OPEN_ID_CLIENT_SECRET_KEY = environ.get( - # "OPEN_ID_CLIENT_SECRET_KEY", default="JXeQExm0JhQPLumgHtIIqf52bDalHz0q" - "OPEN_ID_CLIENT_SECRET_KEY", - default="JXeQExm0JhQPLumgHtIIqf52bDalHz0q", + "OPEN_ID_CLIENT_SECRET_KEY", default="JXeQExm0JhQPLumgHtIIqf52bDalHz0q" ) # noqa: S105 SPIFFWORKFLOW_BACKEND_LOG_TO_FILE = ( diff --git a/src/spiffworkflow_backend/routes/health_controller.py b/src/spiffworkflow_backend/routes/health_controller.py index 31154e15..2cb4092b 100644 --- a/src/spiffworkflow_backend/routes/health_controller.py +++ b/src/spiffworkflow_backend/routes/health_controller.py @@ -1,6 +1,5 @@ """APIs for dealing with process groups, process models, and process instances.""" -import json - +from flask import make_response from flask.wrappers import Response from spiffworkflow_backend.models.process_instance import ProcessInstanceModel @@ -9,7 +8,4 @@ from spiffworkflow_backend.models.process_instance import ProcessInstanceModel def status() -> Response: """Status.""" ProcessInstanceModel.query.filter().first() - response = Response( - json.dumps({"ok": True}), status=200, mimetype="application/json" - ) - return response + return make_response({"ok": True}, 200) diff --git a/src/spiffworkflow_backend/routes/user.py b/src/spiffworkflow_backend/routes/user.py index efe0c3de..cc7c9bd4 100644 --- a/src/spiffworkflow_backend/routes/user.py +++ b/src/spiffworkflow_backend/routes/user.py @@ -25,10 +25,6 @@ from spiffworkflow_backend.services.authentication_service import TokenExpiredEr from spiffworkflow_backend.services.authorization_service import AuthorizationService from spiffworkflow_backend.services.user_service import UserService -# from flask.wrappers import Response - -# from flask_jwt_extended import set_access_cookies - """ .. module:: crc.api.user :synopsis: Single Sign On (SSO) user login and session handlers