fix /bookmarks not returning bookmarks in desc

This commit is contained in:
2025-05-29 14:35:37 +01:00
parent a202f2c222
commit 835a76709c

View File

@@ -92,7 +92,7 @@ function findBookmarks(
type ParamType = (string | number)[]
if (tagIds.length === 0) {
let query = `SELECT id, title, url FROM bookmarks WHERE user_id = ?${ids.length > 0 ? `AND id IN (${Array(ids.length).fill("?").join(",")})` : ""}`
let query = `SELECT id, title, url FROM bookmarks WHERE user_id = ?${ids.length > 0 ? ` AND id IN (${Array(ids.length).fill("?").join(",")})` : ""} ORDER BY id DESC`
if (limit) {
query += " LIMIT ?"
}