Update forceUserDisconnect()
This commit is contained in:
parent
c325312988
commit
1140ae502a
|
@ -54,14 +54,22 @@ async function updateDevicesStatus() {
|
|||
}
|
||||
|
||||
async function forceUserDisconnect(mac) {
|
||||
await prisma.wifiDevice.update({
|
||||
where: { mac },
|
||||
data: {
|
||||
user: {
|
||||
disconnect: true
|
||||
try {
|
||||
await prisma.wifiDevice.update({
|
||||
where: { mac },
|
||||
data: {
|
||||
user: {
|
||||
disconnect: true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
} catch (e) {
|
||||
logError({
|
||||
tags: ['wifiDevices'],
|
||||
message: `Erro tentando desconectar o usuário do dispositivo "${mac}".`,
|
||||
data: { error: e, mac }
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function mockHostName({ mac, oui }) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user