Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed the function call to getAdminInfo() #505

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

code-Gambler
Copy link
Contributor

Description

As the functions handleRefresh() and toggleIsEnabled() were calling the function getAdminInfo() unnecessarily despite of the information already being present in the frontend. So, removed the function call to getAdminInfo()

Ran the unit tests and tested the dashboard application as well.

Related Issue

#465

Does this introduce a breaking change?

  • Yes
  • No

…nction call to getAdminInfo()

Commented to test the change

465
Copy link

vercel bot commented May 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bandada-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 6:04pm

0xjei

This comment was marked as outdated.

@vplasencia
Copy link
Member

Hey @code-Gambler thank you very much for the PR 🙏

I was testing it locally and the API Key component in the dashboard does not work properly when I want to generate a new API Key. Does it work fine for you?

@0xjei
Copy link
Collaborator

0xjei commented May 22, 2024

Hey @code-Gambler thank you very much for the PR 🙏

I was testing it locally and the API Key component in the dashboard does not work properly when I want to generate a new API Key. Does it work fine for you?

My bad on approving this - I remember that the getAdminInfo() is necessary when refreshing the API Key (getting the update admin info means getting the updated key). Does it make sense? @vplasencia

@vplasencia
Copy link
Member

vplasencia commented May 22, 2024

Hey @0xjei!

Does it make sense?

Yes, correct. Those functions were necessary to have the updated info.

I think there could be a way to improve that code to prevent calling the API if the data is already in the frontend.

@0xjei
Copy link
Collaborator

0xjei commented May 22, 2024

Hey @0xjei!

Does it make sense?

Yes, correct. Those functions were necessary to have the updated info.

I think there could be a way to improve that code to prevent calling the API if the data is already in the frontend.

yes, there can be some sort of optimization for sure :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor the ApiKeyComponent code in the dashboard
3 participants