refactor: consolidate toDbMs into query-shared.ts

This commit is contained in:
2026-03-28 12:06:58 -07:00
parent c43941fc7e
commit 5348ae8528
5 changed files with 8 additions and 15 deletions

View File

@@ -16,6 +16,7 @@ import {
getAffectedWordIdsForSessions,
getAffectedWordIdsForVideo,
refreshLexicalAggregates,
toDbMs,
} from './query-shared';
type CleanupVocabularyRow = {
@@ -543,6 +544,3 @@ export function deleteVideo(db: DatabaseSync, videoId: number): void {
throw error;
}
}
function toDbMs(ms: number | bigint): bigint {
return BigInt(Math.trunc(Number(ms)));
}