Make period output nicer -- seconds rather than duration

This commit is contained in:
Jeff Mitchell 2016-04-14 06:10:22 -04:00
parent a4ff72841e
commit ae2d000de4
1 changed files with 5 additions and 0 deletions

View File

@ -1288,6 +1288,11 @@ func (ts *TokenStore) tokenStoreRoleRead(
Data: structs.New(role).Map(),
}
// Make the period nicer
if role.Period != 0 {
resp.Data["period"] = role.Period.Seconds()
}
return resp, nil
}