mirror of https://github.com/1Panel-dev/1Panel
feat: 网站分组删除校验 (#377)
parent
a56e5a8abe
commit
5d1fced8e9
|
@ -58,7 +58,7 @@ func (u *GroupService) Delete(id uint) error {
|
||||||
}
|
}
|
||||||
switch group.Type {
|
switch group.Type {
|
||||||
case "website":
|
case "website":
|
||||||
websites, _ := websiteRepo.GetBy(commonRepo.WithByGroupID(id))
|
websites, _ := websiteRepo.GetBy(websiteRepo.WithGroupID(id))
|
||||||
if len(websites) > 0 {
|
if len(websites) > 0 {
|
||||||
return buserr.New(constant.ErrGroupIsUsed)
|
return buserr.New(constant.ErrGroupIsUsed)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue