feat: add pagination

This commit is contained in:
gosangam
2026-04-14 23:15:26 +05:30
parent beffb9fae1
commit 213eea8e94
7 changed files with 428 additions and 406 deletions
+20
View File
@@ -154,6 +154,26 @@ export async function getChapterVerses(
};
}
// ---------------------------------------------------------------------------
// Single verse
// ---------------------------------------------------------------------------
/**
* Get a single verse by its exact coordinates.
*/
export async function getSingleVerse(
book: string,
division: string | null,
chapter: number,
verse: number,
): Promise<VerseRecord | null> {
const result = await prisma.verse.findFirst({
where: { book, division, chapter, verse },
});
return result as unknown as VerseRecord | null;
}
// ---------------------------------------------------------------------------
// Glossary
// ---------------------------------------------------------------------------