mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-03 21:08:25 +00:00 
			
		
		
		
	Refactor error system (#33610)
This commit is contained in:
		@@ -18,7 +18,7 @@ import (
 | 
			
		||||
// OpenIDPost response for change user's openid
 | 
			
		||||
func OpenIDPost(ctx *context.Context) {
 | 
			
		||||
	if user_model.IsFeatureDisabledWithLoginType(ctx.Doer, setting.UserFeatureManageCredentials) {
 | 
			
		||||
		ctx.Error(http.StatusNotFound)
 | 
			
		||||
		ctx.HTTPError(http.StatusNotFound)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -111,7 +111,7 @@ func settingsOpenIDVerify(ctx *context.Context) {
 | 
			
		||||
// DeleteOpenID response for delete user's openid
 | 
			
		||||
func DeleteOpenID(ctx *context.Context) {
 | 
			
		||||
	if user_model.IsFeatureDisabledWithLoginType(ctx.Doer, setting.UserFeatureManageCredentials) {
 | 
			
		||||
		ctx.Error(http.StatusNotFound)
 | 
			
		||||
		ctx.HTTPError(http.StatusNotFound)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -128,7 +128,7 @@ func DeleteOpenID(ctx *context.Context) {
 | 
			
		||||
// ToggleOpenIDVisibility response for toggle visibility of user's openid
 | 
			
		||||
func ToggleOpenIDVisibility(ctx *context.Context) {
 | 
			
		||||
	if user_model.IsFeatureDisabledWithLoginType(ctx.Doer, setting.UserFeatureManageCredentials) {
 | 
			
		||||
		ctx.Error(http.StatusNotFound)
 | 
			
		||||
		ctx.HTTPError(http.StatusNotFound)
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user