Add comments
This commit is contained in:
parent
c759507f18
commit
7d74f9e21d
5 changed files with 7 additions and 0 deletions
|
@ -16,4 +16,5 @@ init()
|
|||
|
||||
@app.route("/")
|
||||
def root() -> Response:
|
||||
"""Root page"""
|
||||
return redirect("index")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -6,4 +6,5 @@ router = Blueprint("index", __name__)
|
|||
|
||||
@router.route("")
|
||||
def index() -> str:
|
||||
"""Index page"""
|
||||
return render_template("index.html", config=Config)
|
||||
|
|
Reference in a new issue