DevicesApi
This commit is contained in:
@@ -18,4 +18,6 @@ $router->any('/ajax', 'Ajax');
|
||||
$router->any('/log', 'Log');
|
||||
$router->any('/rooms', 'Rooms');
|
||||
|
||||
$router->get('/api/devices', 'DevicesApi@getAllDevices');
|
||||
|
||||
$router->run($_SERVER['REQUEST_METHOD'], '/'.(isset($_GET['url']) ? $_GET['url'] : ''));
|
||||
|
17
app/api/DevicesApi.php
Normal file
17
app/api/DevicesApi.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
class DevicesApi extends ApiController{
|
||||
|
||||
public function getAllDevices(){
|
||||
$this->requireAuth();
|
||||
$response = [];
|
||||
|
||||
// TODO: process the request
|
||||
|
||||
$this->response($response);
|
||||
}
|
||||
|
||||
public function getDevicesByRoom($roomId){
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user