1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-25 03:38:36 +00:00

Add a button editing action secret (#34348)

Add a button editing action secret
Closes #34190

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
NorthRealm
2025-05-08 17:11:43 +00:00
committed by GitHub
parent 2fbc8f9e87
commit 4c611bf280
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)
}