2.0.0 Beta : Self-hosted Release

This commit is contained in:
2026-08-09 02:03:29 +08:00
parent 63a0751aba
commit 37cb05eb70
33 changed files with 810 additions and 31 deletions
+20
View File
@@ -1,8 +1,28 @@
from flask import Blueprint, render_template, request, jsonify
from web.database import query_db
from web.config import Config
from web.services.stats_service import StatsService
bp = Blueprint('main', __name__)
@bp.route('/healthz')
def healthz():
try:
for db_name in ('l2', 'l3', 'web'):
query_db(db_name, 'SELECT 1', one=True)
except Exception as exc:
return jsonify({
'status': 'unhealthy',
'error': str(exc),
'brand': Config.BRAND_PRIMARY,
}), 503
return jsonify({
'status': 'ok',
'version': '2.0.0-beta',
'brand': Config.BRAND_PRIMARY,
})
@bp.route('/')
def index():
recent_matches = StatsService.get_recent_matches(limit=5)