feat: worst-scan fansub web — initial release
Posts engine (SQLite + auto-publisher via poller), public feed with clickable tags, reader, admin panel, submit/search/queue tools. BFF proxy to pipeline API. Clean dark design. Docker-ready.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { NextRequest } from "next/server"
|
||||
import { publishPost } from "@/lib/db"
|
||||
|
||||
export async function POST(
|
||||
req: NextRequest,
|
||||
{ params }: { params: Promise<{ id: string }> },
|
||||
) {
|
||||
const { id } = await params
|
||||
const body = await req.json().catch(() => ({}))
|
||||
const publish = body.publish !== false
|
||||
const post = publishPost(Number(id), publish)
|
||||
if (!post) return Response.json({ error: "Post not found" }, { status: 404 })
|
||||
return Response.json({ data: post })
|
||||
}
|
||||
Reference in New Issue
Block a user