9 lines
301 B
TypeScript
9 lines
301 B
TypeScript
import { getChat } from "@/src/store/chats";
|
|||
|
|
|
||
|
|
export async function GET(_req: Request, { params }: { params: Promise<{ id: string }> }) {
|
||
|
|
const { id } = await params;
|
||
|
|
const chat = getChat(id);
|
||
|
|
if (!chat) return Response.json({ error: "Not found" }, { status: 404 });
|
||
|
|
return Response.json(chat);
|
||
|
|
}
|