diff --git a/backend/app/service/website.go b/backend/app/service/website.go index 7c6bc253e..f6404f0a5 100644 --- a/backend/app/service/website.go +++ b/backend/app/service/website.go @@ -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 { diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 9641b5df4..b54c2a89b 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -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', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 2a1731025..bf5b1f093 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1152,7 +1152,7 @@ const message = { runtime: '运行环境', deleteRuntimeHelper: '运行环境应用需要跟网站一并删除,请谨慎处理', proxyType: '监听网络类型', - unix: 'Uinx 网络', + unix: 'Unix 网络', tcp: 'TCP/IP 网络', phpFPM: 'FPM 配置文件', phpConfig: 'PHP 配置文件', diff --git a/frontend/src/views/website/website/create/index.vue b/frontend/src/views/website/website/create/index.vue index 25dc64651..340c12d4c 100644 --- a/frontend/src/views/website/website/create/index.vue +++ b/frontend/src/views/website/website/create/index.vue @@ -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); } }