Skip to content

Commit

Permalink
feat: Updated API/route.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Mar 12, 2024
1 parent 828c526 commit 9e19287
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion API/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ async def read_employee(EmployeeCode: int):


@router.put("/update/{EmployeeCode}", response_model=str)
async def update_employees(EmployeeCode: int, Employee: UpdateEmployee):
async def update_employees(EmployeeCode: int, Employee: UpdateEmployee, use_cloud_db: bool = False):
"""
Update employee information based on the provided EmployeeCode.
Expand Down Expand Up @@ -227,6 +227,7 @@ async def update_employees(EmployeeCode: int, Employee: UpdateEmployee):
update_result = client.update_one(
collection,
{"_id": ObjectId(user_id["_id"])},
client = Database(use_cloud_db=use_cloud_db)
update={"$set": Employee_data},
)
logging.info(f"Update result {update_result}")
Expand Down

0 comments on commit 9e19287

Please sign in to comment.