mirror of
https://codeberg.org/timelimit/timelimit-server.git
synced 2025-10-03 09:49:32 +02:00
Delete app activities when deleting device
This commit is contained in:
parent
aa141c33a2
commit
67bb7d4b9c
1 changed files with 8 additions and 0 deletions
|
@ -49,6 +49,14 @@ export async function removeDevice ({ database, familyId, deviceId, websocket }:
|
||||||
transaction
|
transaction
|
||||||
})
|
})
|
||||||
|
|
||||||
|
await database.appActivity.destroy({
|
||||||
|
where: {
|
||||||
|
familyId,
|
||||||
|
deviceId
|
||||||
|
},
|
||||||
|
transaction
|
||||||
|
})
|
||||||
|
|
||||||
// remove as current device
|
// remove as current device
|
||||||
await database.user.update({
|
await database.user.update({
|
||||||
currentDevice: ''
|
currentDevice: ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue