Skip to content

chore: make default workspace proxy editable #7903

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

Merged
merged 13 commits into from
Jun 8, 2023

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Jun 7, 2023

Fixes #7718

How it works

Stores the display name and icon url in the site_configs table. The other proxy fields are computed and not able to be changed.

Extra

wsproxy ls now includes the default.

@Emyrk Emyrk requested a review from deansheather June 7, 2023 16:25
if err != nil {
httpapi.InternalServerError(rw, err)
return
}

var updatedProxy database.WorkspaceProxy
if proxy.ID.String() == deploymentIDStr {
Copy link
Member

Choose a reason for hiding this comment

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

Since the code for this route is completely different for primary and other proxies, could you register it as a different route on the handler? like PUT /api/v2/proxies/primary, PUT /api/v2/proxies/${deployment_id}, and PUT /api/v2/proxies/:other_id.

Copy link
Member Author

Choose a reason for hiding this comment

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

Interesting idea. I can try it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I factored it out into it's own function. It's own route got a bit tricky since I had to duplicate route blocks.

@Emyrk Emyrk merged commit fa8153a into main Jun 8, 2023
@Emyrk Emyrk deleted the origin/stevenmasley/edit_default_proxy_2 branch June 8, 2023 15:30
@github-actions github-actions bot locked and limited conversation to collaborators Jun 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workspace proxies: edit default proxy
2 participants