before claude fix #1
This commit is contained in:
36
FitnessSync/backend/src/api/status.py
Normal file
36
FitnessSync/backend/src/api/status.py
Normal file
@@ -0,0 +1,36 @@
|
||||
from fastapi import APIRouter
|
||||
from pydantic import BaseModel
|
||||
from typing import List, Optional
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
class SyncLogResponse(BaseModel):
|
||||
id: int
|
||||
operation: str
|
||||
status: str
|
||||
message: Optional[str]
|
||||
start_time: str
|
||||
end_time: Optional[str]
|
||||
records_processed: int
|
||||
records_failed: int
|
||||
|
||||
class StatusResponse(BaseModel):
|
||||
total_weight_records: int
|
||||
synced_weight_records: int
|
||||
unsynced_weight_records: int
|
||||
total_activities: int
|
||||
downloaded_activities: int
|
||||
recent_logs: List[SyncLogResponse]
|
||||
|
||||
@router.get("/status")
|
||||
async def get_status():
|
||||
# This would return the current sync status
|
||||
# Implementation will connect with the services layer
|
||||
return {
|
||||
"total_weight_records": 100,
|
||||
"synced_weight_records": 85,
|
||||
"unsynced_weight_records": 15,
|
||||
"total_activities": 50,
|
||||
"downloaded_activities": 30,
|
||||
"recent_logs": []
|
||||
}
|
||||
Reference in New Issue
Block a user