API version endpoint

This commit is contained in:
Inex Code 2021-11-18 09:35:50 +02:00
parent ec76484857
commit 1432671cbe
2 changed files with 2 additions and 3 deletions

View file

@ -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/<string:username>")
api.add_resource(DecryptDisk, "/decryptDisk")

View file

@ -12,8 +12,6 @@ class ApiVersion(Resource):
---
tags:
- System
security:
- bearerAuth: []
responses:
200:
description: API version