checkpoint: get accounts from list

This commit is contained in:
Dan Anglin 2024-05-19 08:04:30 +01:00
parent 7bca944ae2
commit a0bef8c14b
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638

View file

@ -173,6 +173,15 @@ func (c *showCommand) showList(gts *client.Client) error {
return fmt.Errorf("unable to retrieve the list; %w", err) return fmt.Errorf("unable to retrieve the list; %w", err)
} }
accounts, err := gts.GetAccountsFromList(c.listID, 0)
if err != nil {
return fmt.Errorf("unable to retrieve the accounts from the list; %w", err)
}
for i := range accounts {
list.Accounts[accounts[i].ID] = accounts[i].Username
}
fmt.Println(list) fmt.Println(list)
return nil return nil