()
| 3 | import { bookmarks } from "@/db/schema"; |
| 4 | |
| 5 | export async function GET() { |
| 6 | try { |
| 7 | const allBookmarks = await db.select().from(bookmarks); |
| 8 | return NextResponse.json(allBookmarks); |
| 9 | } catch (error) { |
| 10 | console.error("Error fetching bookmarks:", error); |
| 11 | return NextResponse.json( |
| 12 | { error: "Failed to fetch bookmarks" }, |
| 13 | { status: 500 }, |
| 14 | ); |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | export async function POST(request: Request) { |
| 19 | try { |
nothing calls this directly
no outgoing calls
no test coverage detected