mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2025-10-04 10:19:26 +02:00
Update dependencies
This commit is contained in:
parent
2bb3777484
commit
eca9473e11
133 changed files with 2298 additions and 2495 deletions
|
@ -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 => ({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue