mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-22 22:15:29 +02:00
update to UserSSHKeypair per feedback
This commit is contained in:
@@ -353,10 +353,10 @@ func loadKeysData(ctx *context.Context) {
|
||||
// Create a struct with the public key including comment
|
||||
publicKeyWithComment, _ := mirrorKeypair.GetPublicKeyWithComment(ctx)
|
||||
mirrorKeyData := struct {
|
||||
*repo_model.MirrorSSHKeypair
|
||||
*repo_model.UserSSHKeypair
|
||||
PublicKeyWithComment string
|
||||
}{
|
||||
MirrorSSHKeypair: mirrorKeypair,
|
||||
UserSSHKeypair: mirrorKeypair,
|
||||
PublicKeyWithComment: publicKeyWithComment,
|
||||
}
|
||||
|
||||
@@ -366,8 +366,8 @@ func loadKeysData(ctx *context.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// RegenerateMirrorSSHKeyPair regenerates the SSH keypair for repository mirroring
|
||||
func RegenerateMirrorSSHKeyPair(ctx *context.Context) {
|
||||
// RegenerateUserSSHKeypair regenerates the SSH keypair for repository mirroring
|
||||
func RegenerateUserSSHKeypair(ctx *context.Context) {
|
||||
_, err := mirror_service.RegenerateSSHKeypairForUser(ctx, ctx.Doer.ID)
|
||||
if err != nil {
|
||||
ctx.ServerError("RegenerateSSHKeypairForUser", err)
|
||||
|
||||
+1
-1
@@ -641,7 +641,7 @@ func registerWebRoutes(m *web.Router) {
|
||||
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.RegenerateMirrorSSHKeyPair)
|
||||
m.Post("/keys/mirror-ssh/regenerate", user_setting.RegenerateUserSSHKeypair)
|
||||
m.Group("/packages", func() {
|
||||
m.Get("", user_setting.Packages)
|
||||
m.Group("/rules", func() {
|
||||
|
||||
Reference in New Issue
Block a user