Add comments

This commit is contained in:
Mylloon 2022-10-27 23:35:43 +02:00
parent c759507f18
commit 7d74f9e21d
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
5 changed files with 7 additions and 0 deletions

View file

@ -16,4 +16,5 @@ init()
@app.route("/")
def root() -> Response:
"""Root page"""
return redirect("index")

View file

@ -7,6 +7,7 @@ from utils.sqlite import FilesDB
class Config:
"""App configuration"""
# App name
name = "Sand"
@ -26,6 +27,7 @@ class Config:
def init() -> None:
"""Initialise everything before running the flask server"""
# Download dependencies
init_font("1.3.0")
init_libjs("fc5e3c53e41490e24ca7f67cb24e7ab389b770f9")

View file

@ -6,4 +6,6 @@ router = Blueprint("download", __name__)
@router.route("", methods=["POST"])
def download() -> Response:
"""Download interface"""
# TODO: Send the encrypted file to the javascript client
return redirect("index")

View file

@ -10,6 +10,7 @@ router = Blueprint("upload", __name__)
@router.route("", methods=["POST"])
def upload() -> Response:
"""Upload interface (receive file from javascript client)"""
if request.method == "POST":
json = request.get_json()
if json:

View file

@ -6,4 +6,5 @@ router = Blueprint("index", __name__)
@router.route("")
def index() -> str:
"""Index page"""
return render_template("index.html", config=Config)