14 lines
382 B
TypeScript
14 lines
382 B
TypeScript
import { apiFetch, jsonResponse } from '../../../_lib/api';
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
export async function GET(
|
|
_req: Request,
|
|
{ params }: { params: Promise<{ id: string }> },
|
|
): Promise<Response> {
|
|
const { id } = await params;
|
|
const res = await apiFetch(`/admin/messages/${id}`);
|
|
const body = await res.json();
|
|
return jsonResponse(body, res.status);
|
|
}
|