API keys: Add last_used_at and docs changes for migration (#64293)

* feat: last_used_at for apikeys

* add: docs and copy changes

* refactor: use br correctly

* remove docs

* removed more docs
This commit is contained in:
Eric Leijonmarck
2023-03-09 14:16:42 +00:00
committed by GitHub
parent 4c0571be3a
commit 17537b033d
4 changed files with 17 additions and 3 deletions

View File

@@ -47,6 +47,7 @@ func (hs *HTTPServer) GetAPIKeys(c *contextmodel.ReqContext) response.Response {
Name: t.Name,
Role: t.Role,
Expiration: expiration,
LastUsedAt: t.LastUsedAt,
}
}

View File

@@ -22,5 +22,6 @@ type ApiKeyDTO struct {
Name string `json:"name"`
Role org.RoleType `json:"role"`
Expiration *time.Time `json:"expiration,omitempty"`
LastUsedAt *time.Time `json:"lastUsedAt,omitempty"`
AccessControl accesscontrol.Metadata `json:"accessControl,omitempty"`
}