Api atHome Fix

This commit is contained in:
JonatanRek 2019-09-04 19:09:36 +02:00
parent d08bfa8018
commit b303a49445

View File

@ -29,13 +29,12 @@ if (isset($obj['user']) && $obj['user'] != ''){
$user = UserManager::getUser($obj['user']);
if (!empty($user)) {
$userId = $user['user_id'];
if (is_bool($obj['atHome'])){
UserManager::atHome($userId, $obj['atHome'] ? 'true' : 'false');
$atHome = boolval ($obj['atHome']);
UserManager::atHome($userId, $atHome ? 'true' : 'false');
echo 'Saved';
header("HTTP/1.1 200 OK");
die();
}
}
}
//Filtrování IP adress