A Next.js 16 + Prisma/Postgres dashboard that pairs with a local Hermes agent over a Postgres message bus: dispatch work, approve side-effecting actions, browse the agent's memory, and watch it run. Ships with an agent-onboarding prompt (ONBOARDING.md) so your Hermes can install it for you step by step. All secrets are env-configured; nothing sensitive is bundled. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
531 B
TypeScript
20 lines
531 B
TypeScript
export const dynamic = "force-dynamic";
|
|
import { NextResponse } from "next/server";
|
|
import { prisma } from "@/lib/prisma";
|
|
|
|
export async function GET() {
|
|
try {
|
|
// Get the most recent calendar entry
|
|
const calendar = await prisma.contentCalendar.findFirst({
|
|
orderBy: { week: "desc" },
|
|
});
|
|
|
|
if (!calendar) return NextResponse.json({ days: [] });
|
|
|
|
// The `data` field contains the full calendar JSON
|
|
return NextResponse.json(calendar.data);
|
|
} catch {
|
|
return NextResponse.json({ days: [] });
|
|
}
|
|
}
|