From 1432671cbeb5a739e81f532fddfa7a5420bcecdf Mon Sep 17 00:00:00 2001 From: Inex Code Date: Thu, 18 Nov 2021 09:35:50 +0200 Subject: [PATCH] API version endpoint --- selfprivacy_api/app.py | 3 ++- selfprivacy_api/resources/common.py | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/selfprivacy_api/app.py b/selfprivacy_api/app.py index cb46982..e7c8f92 100644 --- a/selfprivacy_api/app.py +++ b/selfprivacy_api/app.py @@ -7,7 +7,7 @@ from flask_swagger import swagger from flask_swagger_ui import get_swaggerui_blueprint from selfprivacy_api.resources.users import User, Users -from selfprivacy_api.resources.common import DecryptDisk +from selfprivacy_api.resources.common import ApiVersion, DecryptDisk from selfprivacy_api.resources.system import api_system from selfprivacy_api.resources.services import services as api_services @@ -37,6 +37,7 @@ def create_app(): if auth != "Bearer " + app.config["AUTH_TOKEN"]: return jsonify({"error": "Invalid token"}), 401 + api.add_resource(ApiVersion, "/api/version") api.add_resource(Users, "/users") api.add_resource(User, "/users/") api.add_resource(DecryptDisk, "/decryptDisk") diff --git a/selfprivacy_api/resources/common.py b/selfprivacy_api/resources/common.py index b4fc9ee..fa96a39 100644 --- a/selfprivacy_api/resources/common.py +++ b/selfprivacy_api/resources/common.py @@ -12,8 +12,6 @@ class ApiVersion(Resource): --- tags: - System - security: - - bearerAuth: [] responses: 200: description: API version