mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	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:
		| @@ -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 | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user