handle bookmark delete loading state
This commit is contained in:
@@ -18,7 +18,13 @@ async function listUserBookmarks(request: Bun.BunRequest<"/api/bookmarks">, user
|
||||
}
|
||||
|
||||
const listBookmarksQuery = db.query(
|
||||
"SELECT id, kind, title, url FROM bookmarks WHERE user_id = $userId ORDER BY id LIMIT $limit OFFSET $skip",
|
||||
`
|
||||
SELECT bookmarks.id, bookmarks.kind, bookmarks.title, bookmarks.url, tags.name as tag FROM bookmarks
|
||||
LEFT JOIN tags
|
||||
ON bookmarks.id = tags.bookmark_id
|
||||
WHERE bookmarks.user_id = $userId
|
||||
ORDER BY bookmarks.id LIMIT $limit OFFSET $skip
|
||||
`,
|
||||
)
|
||||
|
||||
const results = listBookmarksQuery.all({
|
||||
|
Reference in New Issue
Block a user