removed duplication

This commit is contained in:
pomidorry
2026-06-04 13:46:36 +03:00
parent 959b903193
commit 3c0e3cf410
5 changed files with 14 additions and 39 deletions
+1 -1
View File
@@ -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")
+1 -1
View File
@@ -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")