diff --git a/backend/middleware/bind_domain.go b/backend/middleware/bind_domain.go index 601fc9f07..bf32af046 100644 --- a/backend/middleware/bind_domain.go +++ b/backend/middleware/bind_domain.go @@ -15,7 +15,7 @@ func BindDomain() gin.HandlerFunc { settingRepo := repo.NewISettingRepo() status, err := settingRepo.Get(settingRepo.WithByKey("BindDomain")) if err != nil { - helper.ErrorWithDetail(c, constant.CodeErrDomain, constant.ErrTypeInternalServer, err) + helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) return } if len(status.Value) == 0 { diff --git a/backend/middleware/ip_limit.go b/backend/middleware/ip_limit.go index 2fd890a0a..dcfda7405 100644 --- a/backend/middleware/ip_limit.go +++ b/backend/middleware/ip_limit.go @@ -15,7 +15,7 @@ func WhiteAllow() gin.HandlerFunc { settingRepo := repo.NewISettingRepo() status, err := settingRepo.Get(settingRepo.WithByKey("AllowIPs")) if err != nil { - helper.ErrorWithDetail(c, constant.CodeErrIP, constant.ErrTypeInternalServer, err) + helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypeInternalServer, err) return } diff --git a/backend/middleware/password_expired.go b/backend/middleware/password_expired.go index e1ed9e9fa..9a6753014 100644 --- a/backend/middleware/password_expired.go +++ b/backend/middleware/password_expired.go @@ -16,7 +16,7 @@ func PasswordExpired() gin.HandlerFunc { settingRepo := repo.NewISettingRepo() setting, err := settingRepo.Get(settingRepo.WithByKey("ExpirationDays")) if err != nil { - helper.ErrorWithDetail(c, constant.CodePasswordExpired, constant.ErrTypePasswordExpired, err) + helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypePasswordExpired, err) return } expiredDays, _ := strconv.Atoi(setting.Value) @@ -27,7 +27,7 @@ func PasswordExpired() gin.HandlerFunc { extime, err := settingRepo.Get(settingRepo.WithByKey("ExpirationTime")) if err != nil { - helper.ErrorWithDetail(c, constant.CodePasswordExpired, constant.ErrTypePasswordExpired, err) + helper.ErrorWithDetail(c, constant.CodeErrInternalServer, constant.ErrTypePasswordExpired, err) return } loc, _ := time.LoadLocation(common.LoadTimeZone())