summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/convert/convert.go
diff options
context:
space:
mode:
authorVlad Temian <vladtemian@gmail.com>2017-11-28 17:21:39 +0200
committerLauris BH <lauris@nix.lv>2017-11-28 17:21:39 +0200
commit6ad4990a65462af770e15330da4777ea59bcc5ad (patch)
tree668ab92742f277f93ccbcc7552190766371909c0 /routers/api/v1/convert/convert.go
parent0c69b768b93fda6b339941c6e26a593718042c52 (diff)
downloadgitea-6ad4990a65462af770e15330da4777ea59bcc5ad.tar.gz
gitea-6ad4990a65462af770e15330da4777ea59bcc5ad.zip
Add fingerprint to ssh key endpoints. (#3009)
* Add fingerprint to ssh key endpoints. * Update gitea sdk vendor
Diffstat (limited to 'routers/api/v1/convert/convert.go')
-rw-r--r--routers/api/v1/convert/convert.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/routers/api/v1/convert/convert.go b/routers/api/v1/convert/convert.go
index 0a0ab364bd..b5aad95a9c 100644
--- a/routers/api/v1/convert/convert.go
+++ b/routers/api/v1/convert/convert.go
@@ -77,11 +77,12 @@ func ToCommit(c *git.Commit) *api.PayloadCommit {
// ToPublicKey convert models.PublicKey to api.PublicKey
func ToPublicKey(apiLink string, key *models.PublicKey) *api.PublicKey {
return &api.PublicKey{
- ID: key.ID,
- Key: key.Content,
- URL: apiLink + com.ToStr(key.ID),
- Title: key.Name,
- Created: key.Created,
+ ID: key.ID,
+ Key: key.Content,
+ URL: apiLink + com.ToStr(key.ID),
+ Title: key.Name,
+ Fingerprint: key.Fingerprint,
+ Created: key.Created,
}
}