Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/server/src/api/get.album.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default hono()
if (next) {
rows = await sql(c)`
SELECT p.* FROM photo_album pa JOIN photo p ON p.id = pa.photo_id
WHERE pa.album_id = ${id} AND pa.photo_id < ${next}
WHERE pa.album_id = ${id} AND pa.photo_id <= ${next}
ORDER BY pa.photo_id DESC
LIMIT ${limit + 1}
`.all()
Expand Down
4 changes: 2 additions & 2 deletions packages/server/src/api/get.photo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default hono()
LEFT JOIN photo_album pa
ON pa.photo_id = p.id
AND pa.album_id = ${albumId}
WHERE p.id < ${next}
WHERE p.id <= ${next}
ORDER BY p.id DESC
LIMIT ${LIMIT + 1}
`.all()
Expand Down Expand Up @@ -77,7 +77,7 @@ export default hono()
? await sql(c)`
SELECT *
FROM photo
WHERE id < ${next}
WHERE id <= ${next}
ORDER BY id DESC
LIMIT ${LIMIT + 1}
`.all()
Expand Down
Loading