mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2026-08-31 19:03:45 +02:00
Update dependencies
This commit is contained in:
@@ -64,48 +64,52 @@ export async function getAppList ({ database, transaction, familyEntry, appsStat
|
||||
|
||||
if (idsOfDevicesWhereInstalledAppsMustBeSynced.length > 0) {
|
||||
const [appsToSync, activitiesToSync] = await Promise.all([
|
||||
database.app.findAll({
|
||||
where: {
|
||||
familyId: familyEntry.familyId,
|
||||
deviceId: {
|
||||
[Sequelize.Op.in]: idsOfDevicesWhereInstalledAppsMustBeSynced
|
||||
}
|
||||
},
|
||||
attributes: [
|
||||
'deviceId',
|
||||
'packageName',
|
||||
'title',
|
||||
'isLaunchable',
|
||||
'recommendation'
|
||||
],
|
||||
transaction
|
||||
}).map((item) => ({
|
||||
deviceId: item.deviceId,
|
||||
packageName: item.packageName,
|
||||
title: item.title,
|
||||
isLaunchable: item.isLaunchable,
|
||||
recommendation: item.recommendation
|
||||
})),
|
||||
database.appActivity.findAll({
|
||||
where: {
|
||||
familyId: familyEntry.familyId,
|
||||
deviceId: {
|
||||
[Sequelize.Op.in]: idsOfDevicesWhereInstalledAppsMustBeSynced
|
||||
}
|
||||
},
|
||||
attributes: [
|
||||
'deviceId',
|
||||
'packageName',
|
||||
'title',
|
||||
'activityName'
|
||||
],
|
||||
transaction
|
||||
}).map((item) => ({
|
||||
deviceId: item.deviceId,
|
||||
packageName: item.packageName,
|
||||
activityName: item.activityName,
|
||||
title: item.title
|
||||
}))
|
||||
(async () => {
|
||||
return (await database.app.findAll({
|
||||
where: {
|
||||
familyId: familyEntry.familyId,
|
||||
deviceId: {
|
||||
[Sequelize.Op.in]: idsOfDevicesWhereInstalledAppsMustBeSynced
|
||||
}
|
||||
},
|
||||
attributes: [
|
||||
'deviceId',
|
||||
'packageName',
|
||||
'title',
|
||||
'isLaunchable',
|
||||
'recommendation'
|
||||
],
|
||||
transaction
|
||||
})).map((item) => ({
|
||||
deviceId: item.deviceId,
|
||||
packageName: item.packageName,
|
||||
title: item.title,
|
||||
isLaunchable: item.isLaunchable,
|
||||
recommendation: item.recommendation
|
||||
}))
|
||||
})(),
|
||||
(async () => {
|
||||
return (await database.appActivity.findAll({
|
||||
where: {
|
||||
familyId: familyEntry.familyId,
|
||||
deviceId: {
|
||||
[Sequelize.Op.in]: idsOfDevicesWhereInstalledAppsMustBeSynced
|
||||
}
|
||||
},
|
||||
attributes: [
|
||||
'deviceId',
|
||||
'packageName',
|
||||
'title',
|
||||
'activityName'
|
||||
],
|
||||
transaction
|
||||
})).map((item) => ({
|
||||
deviceId: item.deviceId,
|
||||
packageName: item.packageName,
|
||||
activityName: item.activityName,
|
||||
title: item.title
|
||||
}))
|
||||
})()
|
||||
])
|
||||
|
||||
return idsOfDevicesWhereInstalledAppsMustBeSynced.map((deviceId): ServerInstalledAppsData => ({
|
||||
|
||||
@@ -106,7 +106,7 @@ export async function getCategoryBaseDatas ({
|
||||
timeWarnings: item.timeWarningFlags,
|
||||
mblMobile: item.minBatteryMobile,
|
||||
mblCharging: item.minBatteryCharging,
|
||||
tempBlockTime: item.temporarilyBlockedEndTime,
|
||||
tempBlockTime: parseInt(item.temporarilyBlockedEndTime, 10),
|
||||
sort: item.sort,
|
||||
networks: networkIdsForSyncing
|
||||
.filter((network) => network.categoryId === item.categoryId)
|
||||
|
||||
Reference in New Issue
Block a user