2021-02-17 20:16:39 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
from flask import jsonify, Blueprint
|
|
|
|
from app.classes.update import Update
|
|
|
|
|
|
|
|
update_bp = Blueprint("update", __name__)
|
|
|
|
|
|
|
|
|
|
|
|
@update_bp.route("/check", methods=["GET"])
|
|
|
|
def check():
|
|
|
|
""" Check the presence of new version """
|
|
|
|
return jsonify(Update().check_version())
|
|
|
|
|
|
|
|
|
2021-02-19 10:57:11 +01:00
|
|
|
@update_bp.route("/get-version", methods=["GET"])
|
|
|
|
def get_version():
|
|
|
|
""" Check the current version """
|
|
|
|
return jsonify(Update().get_current_version())
|
|
|
|
|
|
|
|
|
2021-02-17 20:16:39 +01:00
|
|
|
@update_bp.route("/process", methods=["GET"])
|
|
|
|
def process():
|
|
|
|
""" Check the presence of new version """
|
|
|
|
return jsonify(Update().update_instance())
|