Skip to content

Commit

Permalink
chore: add endpoint to update users
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Naik committed Nov 7, 2024
1 parent 204a570 commit 05a580b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions letta/server/rest_api/routers/v1/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ def create_user(
return user


@router.put("/", tags=["admin"], response_model=User, operation_id="update_user")
def update_user(
user: User = Body(...),
server: "SyncServer" = Depends(get_letta_server),
):
"""
Update a user in the database
"""
user = server.user_manager.update_user(user)
return user

@router.delete("/", tags=["admin"], response_model=User, operation_id="delete_user")
def delete_user(
user_id: str = Query(..., description="The user_id key to be deleted."),
Expand Down

0 comments on commit 05a580b

Please sign in to comment.