( collectionId: string, )
| 18 | } |
| 19 | |
| 20 | async function getUncompletedSession( |
| 21 | collectionId: string, |
| 22 | ): Promise<LocalPracticeSession | undefined> { |
| 23 | return await db.practice_sessions |
| 24 | .where('collectionId') |
| 25 | .equals(collectionId) |
| 26 | .filter((session) => session.isCompleted === false || session.isCompleted === undefined) |
| 27 | .first() |
| 28 | } |
| 29 | |
| 30 | async function deleteSessionAndPracticeCards(sessionId: string) { |
| 31 | await db.practice_cards.where('sessionId').equals(sessionId).delete() |
no outgoing calls
no test coverage detected