fix linter

This commit is contained in:
pomidorry
2026-06-04 14:41:52 +03:00
parent 177fc0deaa
commit 61209f2cd5
8 changed files with 50 additions and 50 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ func SSHKeys(ctx *context.Context) {
publicKeyWithComment, _ := keypair.GetPublicKeyWithComment(ctx)
ctx.Data["SSHKeypair"] = struct {
*user_model.UserSSHKeypair
*user_model.SSHKeypair
PublicKeyWithComment string
}{keypair, publicKeyWithComment}
@@ -45,7 +45,7 @@ func SSHKeys(ctx *context.Context) {
// RegenerateSSHKey regenerates the SSH keypair for organization mirror operations
func RegenerateSSHKey(ctx *context.Context) {
_, err := user_model.RegenerateUserSSHKeypair(ctx, ctx.Org.Organization.ID)
_, err := user_model.RegenerateSSHKeypair(ctx, ctx.Org.Organization.ID)
if err != nil {
ctx.ServerError("RegenerateSSHKeypairForOrg", err)
return
+5 -5
View File
@@ -350,10 +350,10 @@ func loadKeysData(ctx *context.Context) {
// Create a struct with the public key including comment
publicKeyWithComment, _ := mirrorKeypair.GetPublicKeyWithComment(ctx)
mirrorKeyData := struct {
*user_model.UserSSHKeypair
*user_model.SSHKeypair
PublicKeyWithComment string
}{
UserSSHKeypair: mirrorKeypair,
SSHKeypair: mirrorKeypair,
PublicKeyWithComment: publicKeyWithComment,
}
@@ -363,9 +363,9 @@ func loadKeysData(ctx *context.Context) {
}
}
// RegenerateUserSSHKeypair regenerates the SSH keypair for repository mirroring
func RegenerateUserSSHKeypair(ctx *context.Context) {
_, err := user_model.RegenerateUserSSHKeypair(ctx, ctx.Doer.ID)
// RegenerateSSHKeypair regenerates the SSH keypair for repository mirroring
func RegenerateSSHKeypair(ctx *context.Context) {
_, err := user_model.RegenerateSSHKeypair(ctx, ctx.Doer.ID)
if err != nil {
ctx.ServerError("RegenerateSSHKeypairForUser", err)
return
+1 -1
View File
@@ -673,7 +673,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
m.Combo("/keys").Get(user_setting.Keys).
Post(web.Bind(forms.AddKeyForm{}), user_setting.KeysPost)
m.Post("/keys/delete", user_setting.DeleteKey)
m.Post("/keys/mirror-ssh/regenerate", user_setting.RegenerateUserSSHKeypair)
m.Post("/keys/mirror-ssh/regenerate", user_setting.RegenerateSSHKeypair)
m.Group("/packages", func() {
m.Get("", user_setting.Packages)
m.Group("/rules", func() {