diff --git a/backend/services/backend_api_client.py b/backend/services/backend_api_client.py index af6f785..9bc128b 100644 --- a/backend/services/backend_api_client.py +++ b/backend/services/backend_api_client.py @@ -253,7 +253,7 @@ class BackendAPIClient: def delete_account(self, account_name: str): """Delete an account.""" - endpoint = "delete-account/" + endpoint = "delete-account" return self.post(endpoint, params={"account_name": account_name}) def delete_credential(self, account_name: str, connector_name: str): diff --git a/frontend/pages/orchestration/credentials/app.py b/frontend/pages/orchestration/credentials/app.py index 7c98da0..8ff1eac 100644 --- a/frontend/pages/orchestration/credentials/app.py +++ b/frontend/pages/orchestration/credentials/app.py @@ -42,6 +42,7 @@ with c1: st.header("Create a New Account") new_account_name = st.text_input("New Account Name") if st.button("Create Account"): + new_account_name = new_account_name.strip() if new_account_name: if new_account_name in accounts: st.warning(f"Account {new_account_name} already exists.") @@ -49,7 +50,7 @@ with c1: elif new_account_name == "": st.warning("Please enter a valid account name.") st.stop() - response = client.add_account(new_account_name.strip()) + response = client.add_account(new_account_name) st.write(response) else: st.write("Please enter an account name.")