Moved favicon and Updated Stashboard URLS

This commit is contained in:
ZKWolf 2023-12-18 04:30:03 +01:00
parent f1fb4ed10b
commit 3a1045003a
3 changed files with 30 additions and 12 deletions

View File

@ -141,18 +141,6 @@ def tex_get():
logger.graylog_logger(level="error", handler="general-tex", message=e)
@app.route('/favicon.ico')
def favicon():
check_for_game_client("soft")
try:
return send_from_directory(os.path.join(app.root_path, 'image'), 'favicon.ico',
mimetype='image/vnd.microsoft.icon')
except TimeoutError:
return jsonify({"status": "error"})
except Exception as e:
logger.graylog_logger(level="error", handler="general-favicon", message=e)
@app.route("/api/v1/healthcheck", methods=["GET"])
def healthcheck():
check_for_game_client("soft")
@ -204,6 +192,13 @@ def services_tex():
logger.graylog_logger(level="error", handler="general-services-tex", message=e)
@app.route("/api/v1/statuses/up", methods=["GET"])
def statuses_up():
return jsonify({"description": "The service is up", "level": "NORMAL", "default": True,
"image": "https://api.zkwolf.com/images/icons/fugue/tick-circle.png",
"url": "https://api.zkwolf.com/api/v1/statuses/up", "id": "up", "name": "Up"})
@app.route("/api/v1/services/tex/events/ahdzfnB1Ymxpc2hpbmctc3Rhc2hib2FyZHISCxIFRXZlbnQYgICAgMC1mwoM", methods=["GET"])
def services_tex_events():
try:

View File

@ -27,6 +27,29 @@ def dnt():
return send_from_directory(app.static_folder, request.path[1:])
@app.route('/favicon.ico')
def favicon():
check_for_game_client("soft")
try:
return send_from_directory(os.path.join(app.root_path, 'image'), 'favicon.ico',
mimetype='image/vnd.microsoft.icon')
except TimeoutError:
return jsonify({"status": "error"})
except Exception as e:
logger.graylog_logger(level="error", handler="general-favicon", message=e)
@app.route('/images/icons/fugue/tick-circle.png')
def tick_circle():
try:
return send_from_directory(os.path.join(app.root_path, 'image'), 'tick-circle.png',
mimetype='image/vnd.microsoft.icon')
except TimeoutError:
return jsonify({"status": "error"})
except Exception as e:
logger.graylog_logger(level="error", handler="general-tick-circle-png", message=e)
@app.route("/debug", methods=["Get"])
def debug_root():
check_for_game_client("soft")

BIN
src/image/tick-circle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 B