Skip to content

Commit

Permalink
fix: delete schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
uommou committed May 25, 2024
1 parent a1986d2 commit 3cad2eb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion app/routers/chromadb.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,21 @@ async def add_schedule_endpoint(schedule_data: AddScheduleDTO, chroma_client=Dep
except Exception as e:
raise HTTPException(status_code=500, detail=str(e))

@router.post("/delete_schedule", status_code=status.HTTP_204_NO_CONTENT)
@router.delete("/delete_schedule", status_code=status.HTTP_204_NO_CONTENT)
async def delete_schedule_endpoint(schedule_data: DeleteScheduleDTO, chroma_client=Depends(get_chroma_client)):
try:
# 직접 `add_db_data` 함수를 비동기적으로 호출합니다.
await delete_db_data(schedule_data)
return {"message": "Schedule delete successfully"}
except Exception as e:
raise HTTPException(status_code=500, detail=str(e))


@router.delete("/delete_schedule", status_code=status.HTTP_204_NO_CONTENT)
async def delete_schedule_endpoint(schedule_data: DeleteScheduleDTO, chroma_client=Depends(get_chroma_client)):
try:
# 직접 `add_db_data` 함수를 비동기적으로 호출합니다.
await delete_db_data(schedule_data)
return {"message": "Schedule delete successfully"}
except Exception as e:
raise HTTPException(status_code=500, detail=str(e))

0 comments on commit 3cad2eb

Please sign in to comment.