mirror of
https://github.com/go-gitea/gitea.git
synced 2025-05-05 15:32:53 +00:00
Compare commits
2 Commits
e67f74efc8
...
cbb2e52911
Author | SHA1 | Date | |
---|---|---|---|
|
cbb2e52911 | ||
|
3e49fba578 |
@ -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.
|
||||
|
@ -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"`
|
||||
|
@ -62,6 +62,8 @@ func ListAccessTokens(ctx *context.APIContext) {
|
||||
Name: tokens[i].Name,
|
||||
TokenLastEight: tokens[i].TokenLastEight,
|
||||
Scopes: tokens[i].Scope.StringSlice(),
|
||||
Created: tokens[i].CreatedUnix.AsTime(),
|
||||
Updated: tokens[i].UpdatedUnix.AsTime(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -316,6 +316,7 @@ func ToPublicKey(apiLink string, key *asymkey_model.PublicKey) *api.PublicKey {
|
||||
Title: key.Name,
|
||||
Fingerprint: key.Fingerprint,
|
||||
Created: key.CreatedUnix.AsTime(),
|
||||
Updated: key.UpdatedUnix.AsTime(),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="ui small secondary filter menu">
|
||||
<form id="repo-search-form" class="ui form ignore-dirty tw-flex-1 tw-flex tw-gap-x-2">
|
||||
<form id="repo-search-form" class="ui form ignore-dirty tw-flex-1 tw-flex tw-items-center tw-gap-x-2">
|
||||
{{if .Language}}<input type="hidden" name="language" value="{{.Language}}">{{end}}
|
||||
{{if .PageIsExploreRepositories}}<input type="hidden" name="only_show_relevant" value="{{.OnlyShowRelevant}}">{{end}}
|
||||
{{if .TabName}}<input type="hidden" name="tab" value="{{.TabName}}">{{end}}
|
||||
|
15
templates/swagger/v1_json.tmpl
generated
15
templates/swagger/v1_json.tmpl
generated
@ -19978,11 +19978,21 @@
|
||||
"type": "object",
|
||||
"title": "AccessToken represents an API access token.",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"x-go-name": "Created"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"x-go-name": "ID"
|
||||
},
|
||||
"last_used_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"x-go-name": "Updated"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"x-go-name": "Name"
|
||||
@ -25477,6 +25487,11 @@
|
||||
"type": "string",
|
||||
"x-go-name": "KeyType"
|
||||
},
|
||||
"last_used_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"x-go-name": "Updated"
|
||||
},
|
||||
"read_only": {
|
||||
"type": "boolean",
|
||||
"x-go-name": "ReadOnly"
|
||||
|
Loading…
x
Reference in New Issue
Block a user