1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Add a button editing action secret #34348 (#34462)

Backport #34348

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
NorthRealm
2025-05-16 23:26:21 +08:00
committed by GitHub
parent d018c1b4b1
commit 47537a8361
5 changed files with 62 additions and 14 deletions

View File

@@ -32,11 +32,11 @@ func PerformSecretsPost(ctx *context.Context, ownerID, repoID int64, redirectURL
s, _, err := secret_service.CreateOrUpdateSecret(ctx, ownerID, repoID, form.Name, util.ReserveLineBreakForTextarea(form.Data), form.Description)
if err != nil {
log.Error("CreateOrUpdateSecret failed: %v", err)
ctx.JSONError(ctx.Tr("secrets.creation.failed"))
ctx.JSONError(ctx.Tr("secrets.save_failed"))
return
}
ctx.Flash.Success(ctx.Tr("secrets.creation.success", s.Name))
ctx.Flash.Success(ctx.Tr("secrets.save_success", s.Name))
ctx.JSONRedirect(redirectURL)
}