mirror of
https://gitee.com/fit2cloud-feizhiyun/1Panel.git
synced 2024-12-04 21:09:31 +08:00
fix: 解决删除网站锁库的问题 (#608)
This commit is contained in:
parent
b646c5385d
commit
6115ffe0fc
@ -346,16 +346,6 @@ func (w WebsiteService) DeleteWebsite(req request.WebsiteDelete) error {
|
||||
return err
|
||||
}
|
||||
|
||||
tx, ctx := helper.GetTxAndContext()
|
||||
defer tx.Rollback()
|
||||
_ = backupRepo.DeleteRecord(ctx, commonRepo.WithByType("website"), commonRepo.WithByName(website.Alias))
|
||||
if err := websiteRepo.DeleteBy(ctx, commonRepo.WithByID(req.ID)); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := websiteDomainRepo.DeleteBy(ctx, websiteDomainRepo.WithWebsiteId(req.ID)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if checkIsLinkApp(website) && req.DeleteApp {
|
||||
appInstall, err := appInstallRepo.GetFirst(commonRepo.WithByID(website.AppInstallID))
|
||||
if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
|
||||
@ -367,6 +357,16 @@ func (w WebsiteService) DeleteWebsite(req request.WebsiteDelete) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tx, ctx := helper.GetTxAndContext()
|
||||
defer tx.Rollback()
|
||||
_ = backupRepo.DeleteRecord(ctx, commonRepo.WithByType("website"), commonRepo.WithByName(website.Alias))
|
||||
if err := websiteRepo.DeleteBy(ctx, commonRepo.WithByID(req.ID)); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := websiteDomainRepo.DeleteBy(ctx, websiteDomainRepo.WithWebsiteId(req.ID)); err != nil {
|
||||
return err
|
||||
}
|
||||
tx.Commit()
|
||||
|
||||
if req.DeleteBackup {
|
||||
|
@ -1157,7 +1157,7 @@ const message = {
|
||||
deleteRuntimeHelper:
|
||||
'The Runtime application needs to be deleted together with the website, please handle it with caution',
|
||||
proxyType: 'Listening Network Type',
|
||||
unix: 'Uinx Network',
|
||||
unix: 'Unix Network',
|
||||
tcp: 'TCP/IP Network',
|
||||
phpFPM: 'FPM Config',
|
||||
phpConfig: 'PHP Config',
|
||||
|
@ -1152,7 +1152,7 @@ const message = {
|
||||
runtime: '运行环境',
|
||||
deleteRuntimeHelper: '运行环境应用需要跟网站一并删除,请谨慎处理',
|
||||
proxyType: '监听网络类型',
|
||||
unix: 'Uinx 网络',
|
||||
unix: 'Unix 网络',
|
||||
tcp: 'TCP/IP 网络',
|
||||
phpFPM: 'FPM 配置文件',
|
||||
phpConfig: 'PHP 配置文件',
|
||||
|
@ -394,7 +394,7 @@ const changeRuntime = (runID: number) => {
|
||||
runtimes.value.forEach((item) => {
|
||||
if (item.id === runID) {
|
||||
runtimeResource.value = item.resource;
|
||||
if (item.type === 'appstore') {
|
||||
if (item.resource === 'appstore') {
|
||||
getAppDetailByID(item.appDetailId);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user