mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: implement organization context in the cli (#12259)
* feat: implement organization context in the cli `coder org show current`
This commit is contained in:
@@ -29,7 +29,7 @@ func (r *RootCmd) groupCreate() *clibase.Cmd {
|
||||
Handler: func(inv *clibase.Invocation) error {
|
||||
ctx := inv.Context()
|
||||
|
||||
org, err := agpl.CurrentOrganization(inv, client)
|
||||
org, err := agpl.CurrentOrganization(&r.RootCmd, inv, client)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("current organization: %w", err)
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func (r *RootCmd) groupDelete() *clibase.Cmd {
|
||||
groupName = inv.Args[0]
|
||||
)
|
||||
|
||||
org, err := agpl.CurrentOrganization(inv, client)
|
||||
org, err := agpl.CurrentOrganization(&r.RootCmd, inv, client)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("current organization: %w", err)
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ func (r *RootCmd) groupEdit() *clibase.Cmd {
|
||||
groupName = inv.Args[0]
|
||||
)
|
||||
|
||||
org, err := agpl.CurrentOrganization(inv, client)
|
||||
org, err := agpl.CurrentOrganization(&r.RootCmd, inv, client)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("current organization: %w", err)
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ func (r *RootCmd) groupList() *clibase.Cmd {
|
||||
Handler: func(inv *clibase.Invocation) error {
|
||||
ctx := inv.Context()
|
||||
|
||||
org, err := agpl.CurrentOrganization(inv, client)
|
||||
org, err := agpl.CurrentOrganization(&r.RootCmd, inv, client)
|
||||
if err != nil {
|
||||
return xerrors.Errorf("current organization: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user