|
|
|
@ -6,12 +6,6 @@ import { eq } from 'drizzle-orm'
|
|
|
|
import { cookies } from 'next/headers'
|
|
|
|
import { cookies } from 'next/headers'
|
|
|
|
import { getUser } from '@/lib/auth'
|
|
|
|
import { getUser } from '@/lib/auth'
|
|
|
|
|
|
|
|
|
|
|
|
export const GET = async () => {
|
|
|
|
|
|
|
|
const bookmarks = await db.select().from(bookmark)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return NextResponse.json(bookmarks)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const POST = async (request: NextRequest) => {
|
|
|
|
export const POST = async (request: NextRequest) => {
|
|
|
|
const body = await request.json()
|
|
|
|
const body = await request.json()
|
|
|
|
const token = cookies().get('token')
|
|
|
|
const token = cookies().get('token')
|
|
|
|
|