update to UserSSHKeypair per feedback

This commit is contained in:
techknowlogick committed 2025-08-08 12:20:39 -04:00
1 parent cee2ca0a7f
commit f97acdc60f
8 files changed
+65 -60

No files matched your search

+4 -4
View File
@@ -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)