mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-05 14:23:44 +00:00
(fix) creating key for a team
This commit is contained in:
@@ -18,7 +18,7 @@ const { Option } = Select;
|
||||
|
||||
interface CreateKeyProps {
|
||||
userID: string;
|
||||
teamID: string | null;
|
||||
team: any | null;
|
||||
userRole: string | null;
|
||||
accessToken: string;
|
||||
data: any[] | null;
|
||||
@@ -27,7 +27,7 @@ interface CreateKeyProps {
|
||||
|
||||
const CreateKey: React.FC<CreateKeyProps> = ({
|
||||
userID,
|
||||
teamID,
|
||||
team,
|
||||
userRole,
|
||||
accessToken,
|
||||
data,
|
||||
@@ -130,7 +130,8 @@ const CreateKey: React.FC<CreateKeyProps> = ({
|
||||
<Form.Item label="Team ID" name="team_id">
|
||||
<Input
|
||||
placeholder="ai_team"
|
||||
defaultValue={teamID ? teamID : ""}
|
||||
defaultValue={team && team["team_alias"] ? team["team_alias"] : ""}
|
||||
disabled={true}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label="Models" name="models">
|
||||
|
||||
@@ -203,6 +203,8 @@ const UserDashboard: React.FC<UserDashboardProps> = ({
|
||||
);
|
||||
}
|
||||
|
||||
console.log("inside user dashboard, selected team", selectedTeam);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Grid numItems={1} className="gap-0 p-10 h-[75vh] w-full">
|
||||
@@ -220,8 +222,9 @@ const UserDashboard: React.FC<UserDashboardProps> = ({
|
||||
setData={setKeys}
|
||||
/>
|
||||
<CreateKey
|
||||
key={selectedTeam ? selectedTeam.team_id : null}
|
||||
userID={userID}
|
||||
teamID={selectedTeam ? selectedTeam["team_id"] : null}
|
||||
team={selectedTeam ? selectedTeam : null}
|
||||
userRole={userRole}
|
||||
userModels={userModels}
|
||||
accessToken={accessToken}
|
||||
|
||||
Reference in New Issue
Block a user