test(api): cover persistence, cache consistency and dependency failures

This commit is contained in:
2026-10-14 06:29:28 +03:00
parent 1dc5f08813
commit 6cccda14d2
11 changed files with 1764 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
export async function messageEpoch(prisma, chatId) {
const [row] = await prisma.$queryRawUnsafe(
'SELECT COALESCE(SUM(epoch), 0)::bigint AS epoch FROM public.chat_message_epochs WHERE chat_id = $1::uuid',
chatId,
);
return row.epoch;
}