fix
This commit is contained in:
@@ -34,9 +34,6 @@ type SecurityRepo interface {
|
||||
}
|
||||
|
||||
func (uc *SettingsUsecase) UpdateSecurity(ctx context.Context, value *SecurityConfig) error {
|
||||
if value.KeyLong < 1 || value.ImgWidth < 1 || value.ImgHeight < 1 || value.PwdMinLength < 1 || value.LimitWindow < 1 || value.LimitCount < 1 || value.LockThreshold < 1 || value.LockDuration < 1 || value.PwdExpireDays < 1 {
|
||||
return errors.New("安全配置数值必须大于0")
|
||||
}
|
||||
return uc.SaveSecurityConfig(ctx, value)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user