prepare new database abstraction layer

This commit is contained in:
Jonas Lochmann
2026-08-03 02:00:00 +02:00
parent 7df7790288
commit e907a98c5c
128 changed files with 1078 additions and 1083 deletions
@@ -24,13 +24,13 @@ export async function dispatchChangeParentPassword ({ action, cache }: {
action: ChangeParentPasswordAction
cache: Cache
}) {
const parentEntry = await cache.database.user.findOne({
const parentEntry = await cache.transaction.legacy.database.user.findOne({
where: {
familyId: cache.familyId,
userId: action.parentUserId,
type: 'parent'
},
transaction: cache.transaction
transaction: cache.transaction.legacy.transaction
})
if (!parentEntry) {
@@ -51,7 +51,7 @@ export async function dispatchChangeParentPassword ({ action, cache }: {
parentEntry.secondPasswordSalt = action.newPasswordSecondSalt
parentEntry.secondPasswordHash = newSecondPasswordHash
await parentEntry.save({ transaction: cache.transaction })
await parentEntry.save({ transaction: cache.transaction.legacy.transaction })
{
const clear = cache.getSecondPasswordHashOfParent.cache.clear