Skip to content

Commit 975aabc

Browse files
committed
Add fingerprint to ssh key endpoints.
1 parent 0c69b76 commit 975aabc

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

public/swagger.v1.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6281,6 +6281,10 @@
62816281
"type": "string",
62826282
"x-go-name": "Title"
62836283
},
6284+
"fingerprint": {
6285+
"type": "string",
6286+
"x-go-name": "Fingerprint"
6287+
},
62846288
"url": {
62856289
"type": "string",
62866290
"x-go-name": "URL"
@@ -7178,4 +7182,4 @@
71787182
]
71797183
}
71807184
]
7181-
}
7185+
}

routers/api/v1/convert/convert.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ func ToCommit(c *git.Commit) *api.PayloadCommit {
7777
// ToPublicKey convert models.PublicKey to api.PublicKey
7878
func ToPublicKey(apiLink string, key *models.PublicKey) *api.PublicKey {
7979
return &api.PublicKey{
80-
ID: key.ID,
81-
Key: key.Content,
82-
URL: apiLink + com.ToStr(key.ID),
83-
Title: key.Name,
84-
Created: key.Created,
80+
ID: key.ID,
81+
Key: key.Content,
82+
URL: apiLink + com.ToStr(key.ID),
83+
Title: key.Name,
84+
Fingerprint: key.Fingerprint,
85+
Created: key.Created,
8586
}
8687
}
8788

vendor/code.gitea.io/sdk/gitea/user_key.go

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)