summaryrefslogtreecommitdiffstats
path: root/routers/repo/release.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/release.go')
-rw-r--r--routers/repo/release.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/routers/repo/release.go b/routers/repo/release.go
index 7c87fce327..9f6e502482 100644
--- a/routers/repo/release.go
+++ b/routers/repo/release.go
@@ -7,6 +7,7 @@ package repo
import (
"fmt"
+ "net/http"
"strings"
"code.gitea.io/gitea/models"
@@ -141,7 +142,7 @@ func releasesOrTags(ctx *context.Context, isTagList bool) {
pager.SetDefaultParams(ctx)
ctx.Data["Page"] = pager
- ctx.HTML(200, tplReleases)
+ ctx.HTML(http.StatusOK, tplReleases)
}
// SingleRelease renders a single release's page
@@ -184,7 +185,7 @@ func SingleRelease(ctx *context.Context) {
release.Note = markdown.RenderString(release.Note, ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())
ctx.Data["Releases"] = []*models.Release{release}
- ctx.HTML(200, tplReleases)
+ ctx.HTML(http.StatusOK, tplReleases)
}
// LatestRelease redirects to the latest release
@@ -237,7 +238,7 @@ func NewRelease(ctx *context.Context) {
}
ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled
upload.AddUploadContext(ctx, "release")
- ctx.HTML(200, tplReleaseNew)
+ ctx.HTML(http.StatusOK, tplReleaseNew)
}
// NewReleasePost response for creating a release
@@ -249,7 +250,7 @@ func NewReleasePost(ctx *context.Context) {
ctx.Data["RequireTribute"] = true
if ctx.HasError() {
- ctx.HTML(200, tplReleaseNew)
+ ctx.HTML(http.StatusOK, tplReleaseNew)
return
}
@@ -378,7 +379,7 @@ func EditRelease(ctx *context.Context) {
}
ctx.Data["attachments"] = rel.Attachments
- ctx.HTML(200, tplReleaseNew)
+ ctx.HTML(http.StatusOK, tplReleaseNew)
}
// EditReleasePost response for edit release
@@ -411,7 +412,7 @@ func EditReleasePost(ctx *context.Context) {
ctx.Data["prerelease"] = rel.IsPrerelease
if ctx.HasError() {
- ctx.HTML(200, tplReleaseNew)
+ ctx.HTML(http.StatusOK, tplReleaseNew)
return
}
@@ -464,13 +465,13 @@ func deleteReleaseOrTag(ctx *context.Context, isDelTag bool) {
}
if isDelTag {
- ctx.JSON(200, map[string]interface{}{
+ ctx.JSON(http.StatusOK, map[string]interface{}{
"redirect": ctx.Repo.RepoLink + "/tags",
})
return
}
- ctx.JSON(200, map[string]interface{}{
+ ctx.JSON(http.StatusOK, map[string]interface{}{
"redirect": ctx.Repo.RepoLink + "/releases",
})
}