Add AlreadyUsed field to Auth Keys (fixes #157 and #158)

This commit is contained in:
Juan Font Alonso 2021-10-13 18:13:26 +02:00
parent dd1e425d02
commit 30788e1a70
4 changed files with 20 additions and 3 deletions

View file

@ -57,7 +57,7 @@ var listPreAuthKeys = &cobra.Command{
return
}
d := pterm.TableData{{"ID", "Key", "Reusable", "Ephemeral", "Expiration", "Created"}}
d := pterm.TableData{{"ID", "Key", "Reusable", "Ephemeral", "AlreadyUsed", "Expiration", "Created"}}
for _, k := range *keys {
expiration := "-"
if k.Expiration != nil {
@ -76,6 +76,7 @@ var listPreAuthKeys = &cobra.Command{
k.Key,
reusable,
strconv.FormatBool(k.Ephemeral),
fmt.Sprintf("%v", k.AlreadyUsed),
expiration,
k.CreatedAt.Format("2006-01-02 15:04:05"),
})