Fixes
This commit is contained in:
		@@ -62,6 +62,7 @@ class EndpointsApi extends ApiController{
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		$device = DeviceManager::getDeviceByToken($obj['token']);
 | 
							$device = DeviceManager::getDeviceByToken($obj['token']);
 | 
				
			||||||
 | 
							DeviceManager::setHeartbeat($device['device_id']);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		//Diagnostic
 | 
							//Diagnostic
 | 
				
			||||||
		if (isset($obj['settings'])){
 | 
							if (isset($obj['settings'])){
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,9 @@ class DeviceManager{
 | 
				
			|||||||
		WHERE approved != ?", Array(2));
 | 
							WHERE approved != ?", Array(2));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						static function setHeartbeat($deviceId){
 | 
				
			||||||
 | 
							self::edit($deviceId, ['heartbeat' => date("Y-m-d H:i:s", time())]);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	static function getAllDevicesInRoom ($roomId = "") {
 | 
						static function getAllDevicesInRoom ($roomId = "") {
 | 
				
			||||||
		return Db::loadAll ("SELECT * FROM devices WHERE room_id = ? AND approved != ?", Array($roomId, 2));
 | 
							return Db::loadAll ("SELECT * FROM devices WHERE room_id = ? AND approved != ?", Array($roomId, 2));
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -50,7 +50,7 @@ class SubDeviceManager
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	//check if dubdevice exist
 | 
						//check if dubdevice exist
 | 
				
			||||||
 | 
						//Add History to be set in Creation
 | 
				
			||||||
	public static function create($deviceId, $type, $unit)
 | 
						public static function create($deviceId, $type, $unit)
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		$record = array(
 | 
							$record = array(
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2660,19 +2660,19 @@ html {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  @font-face {
 | 
					  @font-face {
 | 
				
			||||||
	font-family: 'Metropolis';
 | 
						font-family: 'Metropolis';
 | 
				
			||||||
	src: url("../fonts/Metropolis-Regular.ttf");
 | 
						/*src: url("../fonts/Metropolis-Regular.ttf");*/
 | 
				
			||||||
	font-weight: 400;
 | 
						font-weight: 400;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @font-face {
 | 
					  @font-face {
 | 
				
			||||||
	font-family: 'Metropolis';
 | 
						font-family: 'Metropolis';
 | 
				
			||||||
	src: url("../fonts/Metropolis-Medium.ttf");
 | 
						/*src: url("../fonts/Metropolis-Medium.ttf");*/
 | 
				
			||||||
	font-weight: 500;
 | 
						font-weight: 500;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @font-face {
 | 
					  @font-face {
 | 
				
			||||||
	font-family: 'Metropolis';
 | 
						font-family: 'Metropolis';
 | 
				
			||||||
	src: url("../fonts/Metropolis-SemiBold.ttf");
 | 
						/*src: url("../fonts/Metropolis-SemiBold.ttf");*/
 | 
				
			||||||
	font-weight: 600;
 | 
						font-weight: 600;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user