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

Refactor the ApiKeyComponent code in the dashboard #465

Open
vplasencia opened this issue Mar 31, 2024 · 5 comments · May be fixed by #505
Open

Refactor the ApiKeyComponent code in the dashboard #465

vplasencia opened this issue Mar 31, 2024 · 5 comments · May be fixed by #505
Assignees
Labels
good first issue Good for newcomers refactoring ♻️ A code change that neither fixes a bug nor adds a feature

Comments

@vplasencia
Copy link
Member

Description

Every time, the functions handleRefresh and toggleIsEnabled are called, there are two requests to the Bandada API. Just one request is required, the one related to updating the info in the backend (updateApiKey), the other to get the admin information (getAdmin) shouldn't be necessary since all the info is already in the frontend.

The idea is to write the component in a way that only the updateApiKey request is sent to the Bandada API.

@vplasencia vplasencia added the refactoring ♻️ A code change that neither fixes a bug nor adds a feature label Mar 31, 2024
@vplasencia vplasencia added this to the 4. Dione milestone Mar 31, 2024
@vplasencia vplasencia added the good first issue Good for newcomers label Mar 31, 2024
@code-Gambler
Copy link
Contributor

So just remove the function call to getadmininfo() function?

@vplasencia
Copy link
Member Author

Hey @code-Gambler! Yes, the idea would be to remove the getAdminInfo() call if possible from the handleRefresh and toggleIsEnabled functions making sure the component still works properly. Does it make sense?

@code-Gambler
Copy link
Contributor

Yup it does, I will work on it. You can assign it to me!

@vplasencia
Copy link
Member Author

Great! Done. Thanks.

@code-Gambler code-Gambler linked a pull request May 17, 2024 that will close this issue
2 tasks
@code-Gambler
Copy link
Contributor

PR submitted!
Sorry for the delay!

@vplasencia vplasencia linked a pull request May 21, 2024 that will close this issue
2 tasks
@vplasencia vplasencia modified the milestones: 4. Dione, 5. Rhea May 22, 2024
@aguzmant103 aguzmant103 added good first issue Good for newcomers and removed good first issue Good for newcomers labels Jun 3, 2024
@vplasencia vplasencia removed this from the 5. Rhea milestone Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactoring ♻️ A code change that neither fixes a bug nor adds a feature
Projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

3 participants