feat(app): remove backend

This commit is contained in:
ItzCrazyKns
2025-03-19 16:23:27 +05:30
parent 8a24572cd2
commit 217736d05a
145 changed files with 3546 additions and 10516 deletions

View File

@ -0,0 +1,15 @@
import db from '@/lib/db';
export const GET = async (req: Request) => {
try {
let chats = await db.query.chats.findMany();
chats = chats.reverse();
return Response.json({ chats: chats }, { status: 200 });
} catch (err) {
console.error('Error in getting chats: ', err);
return Response.json(
{ message: 'An error has occurred.' },
{ status: 500 },
);
}
};