Merge pull request #2809 from BerriAI/ui_use_token_id_in_key_gen

[UI] QA Fix Edit Key flow - return `token_id` in /key/generate respose
This commit is contained in:
Ishaan Jaff 2024-04-02 21:48:40 -07:00 committed by GitHub
commit 326f95244a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 1 deletions

View file

@ -213,6 +213,11 @@ const ViewKeyTable: React.FC<ViewKeyTableProps> = ({
const handleEditClick = (token: any) => {
console.log("handleEditClick:", token);
// set token.token to token.token_id if token_id is not null
if (token.token_id !== null) {
token.token = token.token_id;
}
setSelectedToken(token);
setEditModalVisible(true);
};