@@ -106,6 +106,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
|
||||
if err := cmdutil.ValidateEnum("order-by", flagOrderBy, []string{"CREATED_AT"}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
variables["orderBy"] = map[string]any{
|
||||
"field": flagOrderBy,
|
||||
"direction": flagOrderDir,
|
||||
@@ -127,12 +128,15 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
|
||||
if err := json.Unmarshal(data, &resp); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if resp.Node == nil {
|
||||
return nil, fmt.Errorf("organization %s not found", flagOrg)
|
||||
}
|
||||
|
||||
if resp.Node.Typename != "Organization" {
|
||||
return nil, fmt.Errorf("expected Organization node, got %s", resp.Node.Typename)
|
||||
}
|
||||
|
||||
return &resp.Node.Frameworks, nil
|
||||
},
|
||||
)
|
||||
@@ -155,6 +159,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
|
||||
if fw.Description != nil {
|
||||
desc = *fw.Description
|
||||
}
|
||||
|
||||
rows = append(rows, []string{
|
||||
fw.ID,
|
||||
fw.Name,
|
||||
|
||||
Reference in New Issue
Block a user