20 lines
614 B
TypeScript
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" ? "返回设置" : "返回首页"}
|
|
/>
|
|
);
|
|
}
|