feat:update form
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { db } from "@/db";
|
||||
import { cdnImageResponse } from "@/lib/cdn-response";
|
||||
|
||||
export async function GET(
|
||||
_request: Request,
|
||||
{ params }: { params: Promise<{ id: string }> }
|
||||
) {
|
||||
const { id } = await params;
|
||||
const record = await db.query.cdn.findFirst({
|
||||
where: (cdn, { eq }) => eq(cdn.id, id),
|
||||
});
|
||||
|
||||
if (!record) {
|
||||
return new Response("Not found", { status: 404 });
|
||||
}
|
||||
|
||||
return cdnImageResponse(record);
|
||||
}
|
||||
Reference in New Issue
Block a user