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 { commentImage, getCommentViewer } from "@/lib/comments/repository";
import { publicMediaUrl } from "@/lib/media/storage";
import { errorResponse } from "@/lib/security/http";
export async function GET(_request: Request, context: { params: Promise<{ id: string }> }) {
try {
const image = await commentImage((await context.params).id, await getCommentViewer());
// Keep old attachment links working without proxying image bytes through the app.
return new Response(null, { status: 307, headers: {
Location: publicMediaUrl(image.objectKey), "Cache-Control": "private, no-store",
} });
} catch (cause) { return errorResponse(cause); }
}