mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
Litellm dev 01 10 2025 p2 (#7679)
* test(test_basic_python_version.py): assert all optional dependencies are marked as extras on poetry Fixes https://github.com/BerriAI/litellm/issues/7677 * docs(secret.md): clarify 'read_and_write' secret manager usage on aws * docs(secret.md): fix doc * build(ui/teams.tsx): add edit/delete button for updating user / team membership on ui allows updating user role to admin on ui * build(ui/teams.tsx): display edit member component on ui, when edit button on member clicked * feat(team_endpoints.py): support updating team member role to admin via api endpoints allows team member to become admin post-add * build(ui/user_dashboard.tsx): if team admin - show all team keys Fixes https://github.com/BerriAI/litellm/issues/7650 * test(config.yml): add tomli to ci/cd * test: don't call python_basic_testing in local testing (covered by python 3.13 testing)
This commit is contained in:
parent
49d74748b0
commit
c4780479a9
15 changed files with 425 additions and 67 deletions
|
@ -2267,6 +2267,47 @@ export const teamMemberAddCall = async (
|
|||
}
|
||||
};
|
||||
|
||||
export const teamMemberUpdateCall = async (
|
||||
accessToken: string,
|
||||
teamId: string,
|
||||
formValues: Member // Assuming formValues is an object
|
||||
) => {
|
||||
try {
|
||||
console.log("Form Values in teamMemberAddCall:", formValues); // Log the form values before making the API call
|
||||
|
||||
const url = proxyBaseUrl
|
||||
? `${proxyBaseUrl}/team/member_update`
|
||||
: `/team/member_update`;
|
||||
const response = await fetch(url, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
[globalLitellmHeaderName]: `Bearer ${accessToken}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
team_id: teamId,
|
||||
role: formValues.role,
|
||||
user_id: formValues.user_id,
|
||||
}),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
const errorData = await response.text();
|
||||
handleError(errorData);
|
||||
console.error("Error response from the server:", errorData);
|
||||
throw new Error("Network response was not ok");
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
console.log("API Response:", data);
|
||||
return data;
|
||||
// Handle success - you might want to update some state or UI based on the created key
|
||||
} catch (error) {
|
||||
console.error("Failed to create key:", error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export const organizationMemberAddCall = async (
|
||||
accessToken: string,
|
||||
organizationId: string,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue