Skip to content

Commit ae5c41e

Browse files
committed
Add proxy edit cli cmd
1 parent ded5685 commit ae5c41e

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

enterprise/cli/workspaceproxy.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ func (r *RootCmd) workspaceProxy() *clibase.Cmd {
2626
r.createProxy(),
2727
r.deleteProxy(),
2828
r.listProxies(),
29+
r.patchProxy(),
2930
},
3031
}
3132

@@ -81,6 +82,9 @@ func (r *RootCmd) patchProxy() *clibase.Cmd {
8182
DisplayName: displayName,
8283
Icon: proxyIcon,
8384
})
85+
if err != nil {
86+
return xerrors.Errorf("update workspace proxy %q: %w", inv.Args[0], err)
87+
}
8488

8589
_, _ = formatter.Format(ctx, updated)
8690
return nil

enterprise/coderd/coderd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func New(ctx context.Context, options *Options) (*API, error) {
120120
httpmw.ExtractWorkspaceProxyParam(api.Database),
121121
)
122122

123-
r.Get("/", api.getWorkspaceProxy)
123+
r.Get("/", api.workspaceProxy)
124124
r.Patch("/", api.patchWorkspaceProxy)
125125
r.Delete("/", api.deleteWorkspaceProxy)
126126
})

enterprise/coderd/workspaceproxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func (api *API) deleteWorkspaceProxy(rw http.ResponseWriter, r *http.Request) {
215215
// @Param workspaceproxy path string true "Proxy ID or name" format(uuid)
216216
// @Success 200 {object} codersdk.WorkspaceProxy
217217
// @Router /workspaceproxies/{workspaceproxy} [get]
218-
func (api *API) getWorkspaceProxy(rw http.ResponseWriter, r *http.Request) {
218+
func (api *API) workspaceProxy(rw http.ResponseWriter, r *http.Request) {
219219
var (
220220
ctx = r.Context()
221221
proxy = httpmw.WorkspaceProxyParam(r)

0 commit comments

Comments
 (0)