Skip to content

Commit

Permalink
#13 Add version number in PROD
Browse files Browse the repository at this point in the history
  • Loading branch information
Valbou committed Oct 17, 2023
1 parent ba848ba commit 7001fbd
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions vtaskr/base/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from vtaskr.libs.secutity.utils import file_to_base64

APP_NAME = "vtaskr"
VERSION = "1.1.0"

# Validators config
PASSWORD_MIN_LENGTH = 10
Expand Down
4 changes: 2 additions & 2 deletions vtaskr/base/hmi/flask/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from flask import Blueprint, jsonify, render_template

from vtaskr.base.config import AVAILABLE_LANGUAGES
from vtaskr.base.config import AVAILABLE_LANGUAGES, VERSION
from vtaskr.libs.flask.utils import ResponseAPI
from vtaskr.libs.openapi.base import openapi

Expand All @@ -17,7 +17,7 @@
@base_bp.route("/", methods=["GET"])
def hello():
"""Just a logo displayed to curious users"""
return render_template("home.html")
return render_template("home.html", version=VERSION)


@base_bp.route("/languages", methods=["GET"])
Expand Down
1 change: 1 addition & 0 deletions vtaskr/base/hmi/flask/templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<body>
<figure>
<img src="/static/vtaskr-logo-light.svg" alt="Logo vTaskr" />
<figcaption>v{{ version }}</figcaption>
</figure>
</body>
</html>
2 changes: 1 addition & 1 deletion vtaskr/libs/openapi/api_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class OpenApiRegistry:
"""
A simple class to register OpenApiv3 elements
https://spec.openapis.org/oas/v3.0.3
https://spec.openapis.org/oas/v3.1.0
https://swagger.io/specification/
Validator: https://www.postman.com/
"""
Expand Down
2 changes: 1 addition & 1 deletion vtaskr/libs/openapi/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"name": "LGPL v3",
"url": "https://www.gnu.org/licenses/lgpl-3.0.en.html",
},
"version": "1.0.0",
"version": "1.1.0",
}
openapi.register_infos(infos)

Expand Down

0 comments on commit 7001fbd

Please sign in to comment.