diff --git a/src/function/device/remove-device.ts b/src/function/device/remove-device.ts index 945ff04..43e1ff6 100644 --- a/src/function/device/remove-device.ts +++ b/src/function/device/remove-device.ts @@ -49,6 +49,14 @@ export async function removeDevice ({ database, familyId, deviceId, websocket }: transaction }) + await database.appActivity.destroy({ + where: { + familyId, + deviceId + }, + transaction + }) + // remove as current device await database.user.update({ currentDevice: ''