Fix: Add missing model imports in /api/reports/last-sync endpoint

- Add Bet, ExtractionStats, and MatchReport model imports to api_get_last_sync function
- Fixes 'name Bet is not defined' error when querying last sync status
parent 4ee6e307
...@@ -1436,7 +1436,7 @@ def api_reports_sync(): ...@@ -1436,7 +1436,7 @@ def api_reports_sync():
def api_get_last_sync(): def api_get_last_sync():
"""Get last sync information for a client - allows client to verify server state""" """Get last sync information for a client - allows client to verify server state"""
try: try:
from app.models import ReportSync, ReportSyncLog, APIToken, ClientActivity from app.models import ReportSync, ReportSyncLog, APIToken, ClientActivity, Bet, ExtractionStats, MatchReport
from app.auth.jwt_utils import validate_api_token, extract_token_from_request from app.auth.jwt_utils import validate_api_token, extract_token_from_request
from sqlalchemy import desc from sqlalchemy import desc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment