fix(sec): modify api route for variables

This commit is contained in:
Gusted 2025-01-25 15:10:03 +01:00 committed by David Rotermund
parent e7c56dbcd3
commit a3d20f641c
3 changed files with 3 additions and 3 deletions

View file

@ -228,7 +228,7 @@ func 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, ctx.Doer.ID, 0, opt.Name, opt.Value); err != nil {
if errors.Is(err, util.ErrInvalidArgument) {
ctx.Error(http.StatusBadRequest, "UpdateVariable", err)
} else {