MCPcopy Create free account
hub / github.com/9d8dev/directory / GET

Function GET

app/api/bookmarks/route.ts:5–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { bookmarks } from "@/db/schema";
4
5export 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
18export async function POST(request: Request) {
19 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected