forked from phoenix/litellm-mirror
working regen flow
This commit is contained in:
parent
5c15e21a05
commit
5d9f2e7115
2 changed files with 4 additions and 4 deletions
|
@ -771,7 +771,7 @@ export const claimOnboardingToken = async (
|
|||
}
|
||||
};
|
||||
|
||||
export const regenerateKeyCall = async (accessToken: string, keyToRegenerate: string) => {
|
||||
export const regenerateKeyCall = async (accessToken: string, keyToRegenerate: string, formData: any) => {
|
||||
try {
|
||||
const url = proxyBaseUrl
|
||||
? `${proxyBaseUrl}/key/${keyToRegenerate}/regenerate`
|
||||
|
@ -783,7 +783,7 @@ export const regenerateKeyCall = async (accessToken: string, keyToRegenerate: st
|
|||
[globalLitellmHeaderName]: `Bearer ${accessToken}`,
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({}),
|
||||
body: JSON.stringify(formData),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
|
|
|
@ -749,7 +749,7 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
|
|||
|
||||
try {
|
||||
const formValues = await regenerateForm.validateFields();
|
||||
const response = await regenerateKeyCall(accessToken, { ...formValues, token: selectedToken?.token });
|
||||
const response = await regenerateKeyCall(accessToken, selectedToken.token, formValues);
|
||||
setRegeneratedKey(response.key);
|
||||
|
||||
// Update the data state with the new key_name
|
||||
|
@ -1173,7 +1173,7 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
|
|||
}}
|
||||
>
|
||||
<Form.Item name="key_alias" label="Key Alias">
|
||||
<TextInput />
|
||||
<TextInput disabled={true} />
|
||||
</Form.Item>
|
||||
<Form.Item name="max_budget" label="Max Budget (USD)">
|
||||
<InputNumber step={0.01} precision={2} style={{ width: '100%' }} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue