diff --git a/backend/v2/backend.py b/backend/v2/backend.py index dbd4288..56602a4 100644 --- a/backend/v2/backend.py +++ b/backend/v2/backend.py @@ -124,12 +124,12 @@ async def get_data(n: str, width: int, background_tasks: BackgroundTasks): try: worksheet = spreadsheet.worksheet(n) values = worksheet.get_all_values() - truncated_values = [row[:width] for row in values] + truncated_values = [row[:width] for row in values[1:]] # # 在讀取資料時觸發更新 # background_tasks.add_task(refresh_data) - return JSONResponse(content={"data": truncated_values}) + return JSONResponse(content=truncated_values) except Exception as e: raise HTTPException(status_code=500, detail=str(e))