Make websocket pushes more targeted

This commit is contained in:
Jonas Lochmann
2022-09-22 08:49:06 +02:00
parent 613776cbf9
commit 84f6f0df69
78 changed files with 224 additions and 140 deletions
@@ -189,5 +189,5 @@ export async function dispatchAddCategoryApps ({ action, cache, fromChildSelfLim
oldCategories.forEach((categoryId) => cache.categoriesWithModifiedApps.add(categoryId))
cache.categoriesWithModifiedApps.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -75,5 +75,5 @@ export async function dispatchAddCategoryNetworkId ({ action, cache }: {
}, { transaction: cache.transaction })
cache.categoriesWithModifiedBaseData.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -52,5 +52,5 @@ export async function dispatchAddU2f ({ action, cache, parentUserId, authenticat
}, { transaction: cache.transaction })
cache.invalidateU2fList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(1)
}
@@ -48,7 +48,7 @@ export async function dispatchAddUser ({ action, cache }: {
}, { transaction: cache.transaction })
cache.invalidiateUserList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(1)
cache.doesUserExist.cache.set(action.userId, true)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2021 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -59,5 +59,5 @@ export async function dispatchChangeParentPassword ({ action, cache }: {
}
cache.invalidiateUserList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2021 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -86,5 +86,5 @@ export async function dispatchCreateCategory ({ action, cache, fromChildSelfLimi
// update the cache
cache.doesCategoryExist.cache.set(action.categoryId, true)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(1)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -59,5 +59,5 @@ export async function dispatchCreateTimeLimitRule ({ action, cache, fromChildSel
}, { transaction: cache.transaction })
cache.categoriesWithModifiedTimeLimitRules.add(action.rule.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -80,7 +80,7 @@ export async function dispatchDeleteCategory ({ action, cache }: {
// update the cache
cache.doesCategoryExist.cache.set(action.categoryId, false)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
if (affectedUserRows !== 0) {
cache.invalidiateUserList = true
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -45,4 +45,5 @@ export async function dispatchDeleteChildTaskAction ({ action, cache }: {
})
cache.categoriesWithModifiedTasks.add(taskInfo.categoryId)
cache.incrementTriggeredSyncLevel(1)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -38,5 +38,5 @@ export async function dispatchDeleteTimeLimitRule ({ action, cache }: {
await ruleEntry.destroy({ transaction: cache.transaction })
cache.categoriesWithModifiedTimeLimitRules.add(ruleEntry.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -87,4 +87,6 @@ export async function dispatchIgnoreManipulation ({ action, cache }: {
await deviceEntry.save({ transaction: cache.transaction })
cache.invalidiateDeviceList = true
cache.incrementTriggeredSyncLevel(1)
cache.incrementTargetedTriggeredSyncLevel(action.deviceId, 2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -41,7 +41,7 @@ export async function dispatchIncrementCategoryExtraTime ({ action, cache }: {
await category.save({ transaction: cache.transaction })
cache.categoriesWithModifiedBaseData.add(category.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
const categoryEntry = await cache.database.category.findOne({
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -42,5 +42,5 @@ export async function dispatchRemoveCategoryApps ({ action, cache }: {
}
cache.categoriesWithModifiedApps.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -43,5 +43,5 @@ export async function dispatchRemoveU2f ({ action, cache, parentUserId, authenti
})
cache.invalidateU2fList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2021 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -178,7 +178,7 @@ export async function dispatchRemoveUser ({ action, cache, parentUserId }: {
await user.destroy({ transaction: cache.transaction })
cache.invalidiateUserList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
cache.doesUserExist.cache.set(action.userId, false)
cache.getSecondPasswordHashOfParent.cache.delete(action.userId)
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -49,4 +49,5 @@ export async function dispatchRenameChild ({ action, cache }: {
cache.invalidiateUserList = true
cache.doesUserExist.cache.set(action.childId, false)
cache.incrementTriggeredSyncLevel(1)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -45,5 +45,5 @@ export async function dispatchResetCategoryNetworkIds ({ action, cache }: {
})
cache.categoriesWithModifiedBaseData.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -98,6 +98,8 @@ export async function dispatchReviewChildTaskAction ({ action, cache }: {
},
transaction: cache.transaction
})
cache.incrementTriggeredSyncLevel(2)
} else {
await cache.database.childTask.update({
pendingRequest: 0
@@ -111,4 +113,5 @@ export async function dispatchReviewChildTaskAction ({ action, cache }: {
}
cache.categoriesWithModifiedTasks.add(taskInfo.categoryId)
cache.incrementTriggeredSyncLevel(1)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -52,5 +52,5 @@ export async function dispatchSetCategoryExtraTime ({ action, cache }: {
})
cache.categoriesWithModifiedBaseData.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -78,5 +78,5 @@ export async function dispatchSetCategoryForUnassignedApps ({ action, cache }: {
})
cache.invalidiateUserList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -51,5 +51,5 @@ export async function dispatchSetChildPassword ({ action, cache }: {
}
cache.invalidiateUserList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -46,5 +46,7 @@ export async function dispatchSetConsiderRebootManipulation ({ action, cache }:
})
cache.invalidiateDeviceList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(1)
cache.incrementTargetedTriggeredSyncLevel(action.deviceId, 2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -54,5 +54,7 @@ export async function dispatchSetDeviceDefaultUser ({ action, cache }: {
})
cache.invalidiateDeviceList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(1)
cache.incrementTargetedTriggeredSyncLevel(action.deviceId, 2)
}
@@ -46,5 +46,7 @@ export async function dispatchSetDeviceDefaultUserTimeout ({ action, cache }: {
})
cache.invalidiateDeviceList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(1)
cache.incrementTargetedTriggeredSyncLevel(action.deviceId, 2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -55,5 +55,7 @@ export async function dispatchSetDeviceUser ({ action, cache }: {
})
cache.invalidiateDeviceList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(1)
cache.incrementTargetedTriggeredSyncLevel(action.deviceId, 2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -63,6 +63,8 @@ export async function dispatchSetKeepSignedIn ({ action, cache, parentUserId }:
if (affectedRows !== 0) {
cache.invalidiateDeviceList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(1)
cache.incrementTargetedTriggeredSyncLevel(action.deviceId, 2)
}
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -118,5 +118,5 @@ export async function dispatchSetParentCategory ({ action, cache, fromChildSelfL
})
cache.categoriesWithModifiedBaseData.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -48,5 +48,5 @@ export async function dispatchSetRelaxPrimaryDevice ({ action, cache }: {
})
cache.invalidiateUserList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -42,4 +42,6 @@ export async function dispatchSetSendDeviceConnected ({ action, cache, sourceDev
cache.devicesWithModifiedShowDeviceConnected.set(action.deviceId, action.enable)
cache.invalidiateDeviceList = true
cache.incrementTriggeredSyncLevel(1)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -55,5 +55,5 @@ export async function dispatchUserSetDisableLimitsUntil ({ action, cache }: {
})
cache.invalidiateUserList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -46,5 +46,5 @@ export async function dispatchSetUserTimezone ({ action, cache }: {
})
cache.invalidiateUserList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -46,5 +46,5 @@ export async function dispatchUpdateCategoryBatteryLimit ({ action, cache }: {
await categoryEntry.save({ transaction: cache.transaction })
cache.categoriesWithModifiedBaseData.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2021 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -72,6 +72,6 @@ export async function dispatchUpdateCategoryBlockAllNotifications ({ action, cac
if (affectedRows !== 0) {
cache.categoriesWithModifiedBaseData.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -70,5 +70,5 @@ export async function dispatchUpdateCategoryBlockedTimes ({ action, cache, fromC
})
cache.categoriesWithModifiedBaseData.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -71,6 +71,6 @@ export async function dispatchUpdateCategoryDisableLimits ({ action, cache, from
if (affectedRows !== 0) {
cache.categoriesWithModifiedBaseData.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2021 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -49,4 +49,5 @@ export async function dispatchUpdateCategoryFlagsAction ({ action, cache }: {
await categoryEntry.save({ transaction: cache.transaction })
cache.categoriesWithModifiedBaseData.add(action.categoryId)
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -42,4 +42,6 @@ export async function dispatchUpdateCategorySorting ({ action, cache }: {
cache.categoriesWithModifiedBaseData.add(categoryId)
}
cache.incrementTriggeredSyncLevel(1)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -80,6 +80,6 @@ export async function dispatchUpdateCategoryTemporarilyBlocked ({ action, cache,
if (affectedRows !== 0) {
cache.categoriesWithModifiedBaseData.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
}
@@ -66,5 +66,5 @@ export async function dispatchUpdateCategoryTimeWarnings ({ action, cache }: {
}
cache.categoriesWithModifiedBaseData.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -47,6 +47,6 @@ export async function dispatchUpdateCategoryTitle ({ action, cache }: {
if (affectedRows !== 0) {
cache.categoriesWithModifiedBaseData.add(action.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -84,5 +84,6 @@ export async function dispatchUpdateChildTaskAction ({ action, cache }: {
cache.categoriesWithModifiedTasks.add(taskInfo.categoryId)
cache.categoriesWithModifiedTasks.add(action.categoryId)
cache.incrementTriggeredSyncLevel(1)
}
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -47,6 +47,6 @@ export async function dispatchUpdateDeviceName ({ action, cache }: {
if (affectedRows !== 0) {
cache.invalidiateDeviceList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(1)
}
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -46,5 +46,6 @@ export async function dispatchUpdateEnableActivityLevelBlocking ({ action, cache
})
cache.invalidiateDeviceList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(1)
cache.incrementTargetedTriggeredSyncLevel(action.deviceId, 2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -46,5 +46,7 @@ export async function dispatchUpdateNetworkTimeVerification ({ action, cache }:
})
cache.invalidiateDeviceList = true
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(1)
cache.incrementTargetedTriggeredSyncLevel(action.deviceId, 1)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -45,4 +45,5 @@ export async function dispatchUpdateParentNotificationFlags ({ action, cache }:
await parentEntry.save({ transaction: cache.transaction })
cache.invalidiateUserList = true
cache.incrementTriggeredSyncLevel(1)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -47,5 +47,5 @@ export async function dispatchUpdateTimelimitRule ({ action, cache }: {
await ruleEntry.save({ transaction: cache.transaction })
cache.categoriesWithModifiedTimeLimitRules.add(ruleEntry.categoryId)
cache.areChangesImportant = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -49,4 +49,5 @@ export async function dispatchUpdateUserFlagsAction ({ action, cache }: {
await userEntry.save({ transaction: cache.transaction })
cache.invalidiateUserList = true
cache.incrementTriggeredSyncLevel(1)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -76,4 +76,5 @@ export async function dispatchUpdateUserLimitLoginCategoryAction ({ action, cach
}
cache.invalidiateUserList = true
cache.incrementTriggeredSyncLevel(2)
}
@@ -1,6 +1,6 @@
/*
* server component for the TimeLimit App
* Copyright (C) 2019 - 2020 Jonas Lochmann
* Copyright (C) 2019 - 2022 Jonas Lochmann
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -69,4 +69,5 @@ export async function dispatchUpdateUserLimitPreBlockDuration ({ action, cache,
})
cache.invalidiateUserList = true
cache.incrementTriggeredSyncLevel(2)
}