fix(seo): join h5_page_records in indexable publication queries
Memind CI / Test, build, and release guards (push) Successful in 8m43s

Prevent Portal crash when sitemap/llms discovery runs against production schema.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-10 09:53:45 +08:00
parent 943dad5221
commit 2313d76eed
+2 -2
View File
@@ -29,7 +29,7 @@ export async function listIndexablePublications(
pr.user_confirmed_at, pr.expires_at, pr.updated_at, pr.published_at,
p.title, p.summary
FROM h5_publish_records pr
LEFT JOIN h5_pages p ON p.id = pr.page_id
LEFT JOIN h5_page_records p ON p.id = pr.page_id
WHERE pr.status = 'online'
AND pr.access_mode = 'public'
AND pr.user_confirmed_at IS NOT NULL
@@ -75,7 +75,7 @@ export async function resolvePublicationIndexSnapshot(
pr.user_confirmed_at, pr.expires_at, pr.updated_at, pr.published_at,
p.title, p.summary
FROM h5_publish_records pr
LEFT JOIN h5_pages p ON p.id = pr.page_id
LEFT JOIN h5_page_records p ON p.id = pr.page_id
WHERE pr.status = 'online'`;
if (id) {
sql += ' AND pr.id = ?';