mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-08 01:14:57 +02:00
removed duplication
This commit is contained in:
@@ -40,7 +40,7 @@ func GetManagedSSHKey(ctx *context.APIContext) {
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
|
||||
keypair, err := ssh_module.GetOrCreateSSHKeypairForOrg(ctx, ctx.Org.Organization.ID)
|
||||
keypair, err := ssh_module.GetOrCreateSSHKeypair(ctx, ctx.Org.Organization.ID)
|
||||
if err != nil {
|
||||
if db.IsErrNotExist(err) {
|
||||
ctx.APIError(http.StatusNotFound, "SSH keypair not found")
|
||||
|
||||
@@ -32,7 +32,7 @@ func GetManagedSSHKey(ctx *context.APIContext) {
|
||||
// "404":
|
||||
// "$ref": "#/responses/notFound"
|
||||
|
||||
keypair, err := ssh_module.GetOrCreateSSHKeypairForUser(ctx, ctx.Doer.ID)
|
||||
keypair, err := ssh_module.GetOrCreateSSHKeypair(ctx, ctx.Doer.ID)
|
||||
if err != nil {
|
||||
if db.IsErrNotExist(err) {
|
||||
ctx.APIError(http.StatusNotFound, "SSH keypair not found")
|
||||
|
||||
Reference in New Issue
Block a user