kind of a mess lol but file caching and front end

This commit is contained in:
2025-04-17 13:28:49 -04:00
parent 21408af48c
commit 8f35cedb4a
45 changed files with 1435 additions and 1316 deletions

View File

@ -106,26 +106,3 @@ async def update_game(game_id: int, game: GameUpdate):
async def delete_game(game_id: int):
return {"message": "Game deleted successfully"}
@router.post("/tcgplayer/process-export")
async def process_tcgplayer_export(export_type: str, db: Session = Depends(get_db)):
"""
Download and process a TCGPlayer export file.
Args:
export_type: Type of export to process (staged, live, or pricing)
db: Database session
"""
try:
# Download the file
file_bytes = await tcgplayer_inventory_service.get_tcgplayer_export(export_type)
# Process the file and load into database
stats = await file_processing_service.process_tcgplayer_export(db, file_bytes)
return {
"message": "Export processed successfully",
"stats": stats
}
except Exception as e:
raise HTTPException(status_code=500, detail=str(e))