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

Backport #34348

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

No files matched your search

+2 -2
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)
}