[优化] 代码优化

This commit is contained in:
ryan
2026-06-04 10:12:53 +08:00
parent bd659d493d
commit 29fdc378a1
8 changed files with 46 additions and 23 deletions
+2 -2
View File
@@ -612,7 +612,7 @@ func buildSnapshotPagesDeployment(projectID *uint) (*snapshotPagesDeployment, er
return nil, errors.New("Pages 激活部署不属于当前项目")
}
localRoot := fmt.Sprintf("%s/deployments/%d/current", openrestyrender.PagesDirPlaceholder, deployment.ID)
cleanedRootDir := strings.TrimSpace(deployment.RootDir)
cleanedRootDir := strings.TrimSpace(project.RootDir)
if cleanedRootDir != "" {
localRoot = path.Join(localRoot, cleanedRootDir)
}
@@ -622,7 +622,7 @@ func buildSnapshotPagesDeployment(projectID *uint) (*snapshotPagesDeployment, er
DeploymentID: deployment.ID,
DeploymentNumber: deployment.DeploymentNumber,
Checksum: deployment.Checksum,
EntryFile: deployment.EntryFile,
EntryFile: project.EntryFile,
SPAFallbackEnabled: project.SPAFallbackEnabled,
SPAFallbackPath: normalizeStoredPagesFallbackPath(project.SPAFallbackPath),
APIProxyEnabled: project.APIProxyEnabled,