diff --git a/backend/app/service/website.go b/backend/app/service/website.go index 86e6fa0c1..066b944d4 100644 --- a/backend/app/service/website.go +++ b/backend/app/service/website.go @@ -96,7 +96,7 @@ func (w WebsiteService) GetWebsites() ([]response.WebsiteDTO, error) { func (w WebsiteService) CreateWebsite(ctx context.Context, create request.WebsiteCreate) error { if exist, _ := websiteRepo.GetBy(websiteRepo.WithDomain(create.PrimaryDomain)); len(exist) > 0 { - return buserr.New(constant.ErrNameIsExist) + return buserr.New(constant.ErrDomainIsExist) } if exist, _ := websiteRepo.GetBy(websiteRepo.WithAlias(create.Alias)); len(exist) > 0 { return buserr.New(constant.ErrAliasIsExist) diff --git a/frontend/src/views/website/website/config/safety/ccdeny/index.vue b/frontend/src/views/website/website/config/safety/ccdeny/index.vue index b8443e041..08710d3d6 100644 --- a/frontend/src/views/website/website/config/safety/ccdeny/index.vue +++ b/frontend/src/views/website/website/config/safety/ccdeny/index.vue @@ -6,12 +6,12 @@ - + - + @@ -35,7 +35,7 @@ import { Website } from '@/api/interface/website'; import { SaveFileContent } from '@/api/modules/files'; import { GetWafConfig, UpdateWafEnable } from '@/api/modules/website'; -import { Rules } from '@/global/form-rules'; +import { checkNumberRange, Rules } from '@/global/form-rules'; import i18n from '@/lang'; import { MsgSuccess } from '@/utils/message'; import { FormInstance } from 'element-plus'; @@ -73,8 +73,8 @@ let fileUpdate = reactive({ content: '', }); let rules = ref({ - cycle: [Rules.requiredInput], - frequency: [Rules.requiredInput], + cycle: [Rules.requiredInput, checkNumberRange(1, 9999999)], + frequency: [Rules.requiredInput, checkNumberRange(1, 9999999)], }); const wafForm = ref();