mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-23 17:36:41 +02:00
Update models/repo/mirror_ssh_keypair.go
Signed-off-by: techknowlogick <matti@mdranta.net>
This commit is contained in:
@@ -158,7 +158,7 @@ func DeleteUserSSHKeypair(ctx context.Context, ownerID int64) error {
|
|||||||
// RegenerateUserSSHKeypair regenerates an SSH keypair for the given owner
|
// RegenerateUserSSHKeypair regenerates an SSH keypair for the given owner
|
||||||
func RegenerateUserSSHKeypair(ctx context.Context, ownerID int64) (*UserSSHKeypair, error) {
|
func RegenerateUserSSHKeypair(ctx context.Context, ownerID int64) (*UserSSHKeypair, error) {
|
||||||
var keypair *UserSSHKeypair
|
var keypair *UserSSHKeypair
|
||||||
err := db.WithTx(ctx, func(ctx context.Context) error {
|
err := db.WithTx2(ctx, func(ctx context.Context) error {
|
||||||
_ = DeleteUserSSHKeypair(ctx, ownerID)
|
_ = DeleteUserSSHKeypair(ctx, ownerID)
|
||||||
|
|
||||||
newKeypair, err := CreateUserSSHKeypair(ctx, ownerID)
|
newKeypair, err := CreateUserSSHKeypair(ctx, ownerID)
|
||||||
|
|||||||
Reference in New Issue
Block a user