Skip to content

Commit 731b61e

Browse files
committed
fix: resolve config settings, background tasks positioning, and chat types
1 parent 97da43a commit 731b61e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

backend/app/routes/documents.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ async def _crawl():
198198

199199
@router.post("/upload", response_model=DocumentResponse, status_code=status.HTTP_202_ACCEPTED)
200200
async def upload_document(
201+
background_tasks: BackgroundTasks,
201202
file: UploadFile = File(...),
202-
background_tasks: Optional[BackgroundTasks] = None,
203203
user: User = Depends(get_current_user),
204204
db: Session = Depends(get_db),
205205
):
@@ -296,8 +296,8 @@ async def upload_document(
296296

297297
@router.post("/urlupload", status_code=status.HTTP_202_ACCEPTED)
298298
async def upload_document_url(
299+
background_tasks: BackgroundTasks,
299300
payload: UploadUrl,
300-
background_tasks: Optional[BackgroundTasks] = None,
301301
user: User = Depends(get_current_user),
302302
db: Session = Depends(get_db),
303303
):
@@ -676,7 +676,7 @@ def delete_document(
676676
def update_chunk_settings(
677677
document_id: str,
678678
settings_update: ChunkSettings,
679-
background_tasks: Optional[BackgroundTasks] = None,
679+
background_tasks: BackgroundTasks,
680680
user: User = Depends(get_current_user),
681681
db: Session = Depends(get_db),
682682
):
@@ -763,7 +763,7 @@ def update_chunk_settings(
763763
@router.post("/{document_id}/retry", response_model=DocumentResponse)
764764
def retry_document_processing(
765765
document_id: str,
766-
background_tasks: Optional[BackgroundTasks] = None,
766+
background_tasks: BackgroundTasks,
767767
user: User = Depends(get_current_user),
768768
db: Session = Depends(get_db),
769769
):

0 commit comments

Comments
 (0)