-
Notifications
You must be signed in to change notification settings - Fork 888
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
Conversation
if err != nil { | ||
httpapi.InternalServerError(rw, err) | ||
return | ||
} | ||
|
||
var updatedProxy database.WorkspaceProxy | ||
if proxy.ID.String() == deploymentIDStr { |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.