Newer
Older
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from flask import Blueprint
from flask import jsonify, session, redirect, url_for
import config
adm_view = Blueprint( "adm", __name__ )
def ping():
"""
Ping function to check if the web application is healthy.
"""
return "pong"
Function to report the version of the web app. The version.py file is
re-generated by the CI/CD for production.
"""
try:
return jsonify( {
"error": False,
"version": version.__version__,
"branch": version.__branch__,
"commit": version.__commit__,
"commiturl": version.__commiturl__,
"treeurl": version.__treeurl__
} )
except:
return jsonify( {
"error": True
} )
@adm_view.route( "/favicon.ico" )
def favicon():
return ""