diff options
Diffstat (limited to 'modules/structs')
-rw-r--r-- | modules/structs/repo_tag.go | 4 | ||||
-rw-r--r-- | modules/structs/user_app.go | 12 | ||||
-rw-r--r-- | modules/structs/user_key.go | 1 |
3 files changed, 10 insertions, 7 deletions
diff --git a/modules/structs/repo_tag.go b/modules/structs/repo_tag.go index 5722513f4f..bb8bfd10cb 100644 --- a/modules/structs/repo_tag.go +++ b/modules/structs/repo_tag.go @@ -11,8 +11,8 @@ type Tag struct { Message string `json:"message"` ID string `json:"id"` Commit *CommitMeta `json:"commit"` - ZipballURL string `json:"zipball_url"` - TarballURL string `json:"tarball_url"` + ZipballURL string `json:"zipball_url,omitempty"` + TarballURL string `json:"tarball_url,omitempty"` } // AnnotatedTag represents an annotated tag diff --git a/modules/structs/user_app.go b/modules/structs/user_app.go index 8401252bd6..15811ceb66 100644 --- a/modules/structs/user_app.go +++ b/modules/structs/user_app.go @@ -11,11 +11,13 @@ import ( // AccessToken represents an API access token. // swagger:response AccessToken type AccessToken struct { - ID int64 `json:"id"` - Name string `json:"name"` - Token string `json:"sha1"` - TokenLastEight string `json:"token_last_eight"` - Scopes []string `json:"scopes"` + ID int64 `json:"id"` + Name string `json:"name"` + Token string `json:"sha1"` + TokenLastEight string `json:"token_last_eight"` + Scopes []string `json:"scopes"` + Created time.Time `json:"created_at"` + Updated time.Time `json:"last_used_at"` } // AccessTokenList represents a list of API access token. diff --git a/modules/structs/user_key.go b/modules/structs/user_key.go index 08eed59a89..c4c41207e1 100644 --- a/modules/structs/user_key.go +++ b/modules/structs/user_key.go @@ -16,6 +16,7 @@ type PublicKey struct { Fingerprint string `json:"fingerprint,omitempty"` // swagger:strfmt date-time Created time.Time `json:"created_at,omitempty"` + Updated time.Time `json:"last_used_at,omitempty"` Owner *User `json:"user,omitempty"` ReadOnly bool `json:"read_only,omitempty"` KeyType string `json:"key_type,omitempty"` |