forked from forgejo/forgejo
Update HTTP status codes to modern codes (#18063)
* 2xx/3xx/4xx/5xx -> http.Status... * http.StatusFound -> http.StatusTemporaryRedirect * http.StatusMovedPermanently -> http.StatusPermanentRedirect
This commit is contained in:
parent
395117d301
commit
3f280f89e7
76 changed files with 211 additions and 212 deletions
|
@ -151,7 +151,7 @@ func Dashboard(ctx *context.Context) {
|
|||
func Milestones(ctx *context.Context) {
|
||||
if unit.TypeIssues.UnitGlobalDisabled() && unit.TypePullRequests.UnitGlobalDisabled() {
|
||||
log.Debug("Milestones overview page not available as both issues and pull requests are globally disabled")
|
||||
ctx.Status(404)
|
||||
ctx.Status(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ func Milestones(ctx *context.Context) {
|
|||
func Pulls(ctx *context.Context) {
|
||||
if unit.TypePullRequests.UnitGlobalDisabled() {
|
||||
log.Debug("Pull request overview page not available as it is globally disabled.")
|
||||
ctx.Status(404)
|
||||
ctx.Status(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -336,7 +336,7 @@ func Pulls(ctx *context.Context) {
|
|||
func Issues(ctx *context.Context) {
|
||||
if unit.TypeIssues.UnitGlobalDisabled() {
|
||||
log.Debug("Issues overview page not available as it is globally disabled.")
|
||||
ctx.Status(404)
|
||||
ctx.Status(http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue