Fix json Listing

This commit is contained in:
Samuel Lorch 2025-08-05 17:11:24 +02:00
parent 1ce31ace46
commit 570197bdfa

View file

@ -93,16 +93,16 @@ func ResourceList(cmd *cobra.Command, args []string) error {
if jsonOutput { if jsonOutput {
outputResources := []ResourceJsonOutput{} outputResources := []ResourceJsonOutput{}
for i := range resources { for i := range resources {
_, _, _, _, pass, desc, err := helper.GetResource(ctx, client, resources[i].ID) _, name, username, uri, pass, desc, err := helper.GetResource(ctx, client, resources[i].ID)
if err != nil { if err != nil {
return fmt.Errorf("Get Resource %w", err) return fmt.Errorf("Get Resource %w", err)
} }
outputResources = append(outputResources, ResourceJsonOutput{ outputResources = append(outputResources, ResourceJsonOutput{
ID: &resources[i].ID, ID: &resources[i].ID,
FolderParentID: &resources[i].FolderParentID, FolderParentID: &resources[i].FolderParentID,
Name: &resources[i].Name, Name: &name,
Username: &resources[i].Username, Username: &username,
URI: &resources[i].URI, URI: &uri,
Password: &pass, Password: &pass,
Description: &desc, Description: &desc,
CreatedTimestamp: &resources[i].Created.Time, CreatedTimestamp: &resources[i].Created.Time,