fix(seed): IgnoreQueryFilters on all seeder queries + sitemap invalid date guard
CI/CD / CI · API (dotnet build + test) (push) Successful in 45s
CI/CD / CI · Admin API (dotnet build) (push) Successful in 31s
CI/CD / CI · Dashboard (tsc) (push) Successful in 1m13s
CI/CD / CI · Admin Web (tsc) (push) Successful in 40s
CI/CD / CI · Website (tsc) (push) Successful in 47s
CI/CD / CI · Koja (tsc) (push) Successful in 59s
CI/CD / Deploy · all services (push) Successful in 3m45s

DemoSeedService / DemoMenuSeeder:
  Add IgnoreQueryFilters() to every seeder lookup (Taxes, MenuCategories,
  MenuItems). Soft-deleted rows still hold their PKs; without this a second
  seed run after user-deletion throws a PK collision on the Tax or category
  that was soft-deleted but is still in the index.

sitemap.ts:
  Guard new Date(post.date) against empty / missing frontmatter date fields.
  new Date("") = Invalid Date → broken <lastmod> in sitemap XML.
  Fall back to the build-time date when the post date is absent or invalid.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-20 15:54:07 +03:30
parent 1daa6d452c
commit 73a5e5183b
3 changed files with 9 additions and 3 deletions
+2 -1
View File
@@ -42,9 +42,10 @@ export default function sitemap(): MetadataRoute.Sitemap {
const posts = getAllPosts(locale);
for (const post of posts) {
const postDate = post.date ? new Date(post.date) : null;
entries.push({
url: `${BASE_URL}/${locale}/blog/${post.slug}`,
lastModified: new Date(post.date),
lastModified: postDate && !isNaN(postDate.getTime()) ? postDate : now,
changeFrequency: "monthly",
priority: 0.7,
});