VNEWS / static /main_patch.py
bep40's picture
Upload static/main_patch.py
556ce05 verified
Raw
History Blame
517 Bytes
# PATCH for main.py - add the detail route
# Apply this by adding after line 397 in main.py:
#
# @app.get("/api/match/{event_id}/detail")
# def api_match_detail(event_id:int, url:str=Query(default=None)):
# """Get match detail. Optional 'url' param with full bongda URL (with slug) for HTML scraping."""
# from match_detail import fetch_match_detail, fetch_match_detail_by_url
# if url:
# return JSONResponse(fetch_match_detail_by_url(url))
# return JSONResponse(fetch_match_detail(event_id))