1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-05 18:05:19 +02:00

fix(sec): modify api route for variables

This commit is contained in:
Gusted 2025-01-25 15:10:03 +01:00 committed by Earl Warren
parent 3705555f67
commit caeb95cb10
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 3 additions and 3 deletions

View file

@ -414,7 +414,7 @@ func (Action) UpdateVariable(ctx *context.APIContext) {
if opt.Name == "" {
opt.Name = ctx.Params("variablename")
}
if _, err := actions_service.UpdateVariable(ctx, v.ID, opt.Name, opt.Value); err != nil {
if _, err := actions_service.UpdateVariable(ctx, v.ID, 0, ctx.Repo.Repository.ID, opt.Name, opt.Value); err != nil {
if errors.Is(err, util.ErrInvalidArgument) {
ctx.Error(http.StatusBadRequest, "UpdateVariable", err)
} else {