kind of a mess lol but file caching and front end
This commit is contained in:
@ -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))
|
||||
|
||||
|
Reference in New Issue
Block a user