feat : comment feature
CI / Verify (push) Successful in 2m30s
CI / Build immutable images and deploy (push) Successful in 3m9s

This commit is contained in:
2026-10-08 01:40:08 +07:00 Unverified
parent 8c8815cda5
commit 5812d99715
65 changed files with 27013 additions and 10 deletions
+13
View File
@@ -0,0 +1,13 @@
import { listComments, requireCommentAdmin, requireCommentViewer } from "@/lib/comments/repository";
import { errorResponse } from "@/lib/security/http";
export async function GET(request: Request) {
try {
const viewer = await requireCommentViewer();
requireCommentAdmin(viewer);
const query = new URL(request.url).searchParams;
return Response.json(await listComments({ viewer, inbox: true, target: query.get("target") || undefined,
status: query.get("status") || undefined, unanswered: query.get("unanswered") === "true", cursor: query.get("cursor") }),
{ headers: { "Cache-Control": "private, no-store" } });
} catch (cause) { return errorResponse(cause); }
}