@@ -113,12 +113,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("cookie banner %s not found", flagBannerID)
|
||||
}
|
||||
|
||||
if resp.Node.Typename != "CookieBanner" {
|
||||
return nil, fmt.Errorf("expected CookieBanner node, got %s", resp.Node.Typename)
|
||||
}
|
||||
|
||||
return &resp.Node.Categories, nil
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user