summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/release.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/release.go')
-rw-r--r--routers/api/v1/repo/release.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/release.go b/routers/api/v1/repo/release.go
index 70c1e0f264..c58e8aea53 100644
--- a/routers/api/v1/repo/release.go
+++ b/routers/api/v1/repo/release.go
@@ -171,7 +171,7 @@ func CreateRelease(ctx *context.APIContext, form api.CreateReleaseOption) {
rel.Repo = ctx.Repo.Repository
rel.Publisher = ctx.User
- if err = models.UpdateRelease(ctx.Repo.GitRepo, rel, nil); err != nil {
+ if err = models.UpdateRelease(ctx.User, ctx.Repo.GitRepo, rel, nil); err != nil {
ctx.ServerError("UpdateRelease", err)
return
}
@@ -245,7 +245,7 @@ func EditRelease(ctx *context.APIContext, form api.EditReleaseOption) {
if form.IsPrerelease != nil {
rel.IsPrerelease = *form.IsPrerelease
}
- if err := models.UpdateRelease(ctx.Repo.GitRepo, rel, nil); err != nil {
+ if err := models.UpdateRelease(ctx.User, ctx.Repo.GitRepo, rel, nil); err != nil {
ctx.Error(500, "UpdateRelease", err)
return
}