feat(admin) : flag Lunaris catalog updates
CI / Verify (push) Successful in 58s
CI / Build immutable images and deploy (push) Successful in 2m9s

This commit is contained in:
2026-09-03 15:42:31 +07:00 Unverified
parent 5700b55d78
commit 2018005758
3 changed files with 12 additions and 6 deletions
+4 -2
View File
@@ -4,15 +4,17 @@ import { connection } from "next/server";
import { StructuredDashboard } from "@/components/admin/structured-dashboard";
import { AdminHeader } from "@/components/admin/admin-header";
import { getAdminSession } from "@/lib/auth/server";
import { getLatestLunarisVersion } from "@/lib/catalog/sync";
import { getActiveCatalog, listGuideCards } from "@/lib/guides/queries";
export default async function AdminPage() {
await connection();
if (!(await getAdminSession())) redirect("/admin/login");
const [guides, trash, catalog] = await Promise.all([
const [guides, trash, catalog, latestCatalogVersion] = await Promise.all([
listGuideCards(),
listGuideCards(true),
getActiveCatalog(),
getLatestLunarisVersion().catch(() => null),
]);
return (
<div className="min-h-svh">
@@ -23,7 +25,7 @@ export default async function AdminPage() {
<h1 className="font-heading text-3xl font-semibold">Guide Dashboard</h1>
<p className="mt-2 text-muted-foreground">จัดการ Guide แบบภาพ-first และบันทึกขึ้นเว็บไซต์ทันที</p>
</header>
<StructuredDashboard guides={guides} trash={trash} catalogVersion={catalog?.version ?? null} />
<StructuredDashboard guides={guides} trash={trash} catalogVersion={catalog?.version ?? null} latestCatalogVersion={latestCatalogVersion} />
</main>
</div>
);