Skip to content

Conversation

@david-crespo
Copy link
Collaborator

@david-crespo david-crespo commented Feb 17, 2023

I did all the ones that are in the API and currently being used in the console.

Things to note

Updating list as I go:

  • Now that there are more combinations of parameters that will work for a lookup, if we're invalidating queries or doing setQueryData, we need to make sure we're using the exact same parameters in all the relevant spots. We can't setQueryData by ID in one place and then do the lookup by name.

Followup work

  • Change the names of the params in the route definitions from (e.g.,) projectName to project, etc. There's no reason they need to be different from the API ones, I was just trying to make the diff less ridiculous

@vercel
Copy link

vercel bot commented Feb 17, 2023

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

Name Status Preview Comments Updated
console-ui-storybook ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 21, 2023 at 8:59PM (UTC)

instanceNetworkInterfaceDelete(params) {
const nic = lookupNetworkInterface(params.path)
instanceNetworkInterfaceDeleteV1({ path, query }) {
const nic = lookup.networkInterface({ ...path, ...query })
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in this file are trivial, so that's good. The calling code badly needs some helpers to clean it up.

}: CreateSideModalFormProps) {
const queryClient = useApiQueryClient()
const pathParams = useRequiredParams('orgName', 'projectName')
const projectSelector = useProjectSelector()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do like this API overall.

@david-crespo david-crespo changed the title Convert some API calls to the v1 endpoints Convert API calls to the v1 endpoints Feb 21, 2023
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.

3 participants