Your Name ea5a189ae0
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
feat: add agent admin settings access
2026-03-17 23:16:52 +08:00

20 lines
614 B
TypeScript

import { requireAgentWorkflowAdmin } from "@/lib/middleware/admin";
import { redirect } from "next/navigation";
import { AgentWorkflowSettingsClient } from "./agent-workflow-settings-client";
export const dynamic = "force-dynamic";
export default async function AgentWorkflowSettingsPage() {
const session = await requireAgentWorkflowAdmin().catch(() => null);
if (!session) {
redirect("/");
}
return (
<AgentWorkflowSettingsClient
backHref={session.user.type === "admin" ? "/settings" : "/"}
backLabel={session.user.type === "admin" ? "返回设置" : "返回首页"}
/>
);
}