refactoring, added rooms api
This commit is contained in:
parent
3981d9551d
commit
c2203b452a
@ -14,8 +14,11 @@ $router->any('/automation', 'Automation');
|
|||||||
$router->any('/setting', 'Setting');
|
$router->any('/setting', 'Setting');
|
||||||
$router->any('/ajax', 'Ajax');
|
$router->any('/ajax', 'Ajax');
|
||||||
|
|
||||||
$router->post('/api/devices', 'DevicesApi@getAllDevices');
|
|
||||||
$router->post('/api/login', 'AuthApi@login');
|
$router->post('/api/login', 'AuthApi@login');
|
||||||
|
$router->post('/api/logout', 'AuthApi@logout');
|
||||||
|
|
||||||
|
$router->post('/api/devices', 'DevicesApi@default');
|
||||||
|
$router->post('/api/rooms', 'RoomsApi@default');
|
||||||
|
|
||||||
$router->get('/api/HA/auth', 'GoogleHomeApi@autorize');
|
$router->get('/api/HA/auth', 'GoogleHomeApi@autorize');
|
||||||
$router->any('/api/HA', 'GoogleHomeApi@response');
|
$router->any('/api/HA', 'GoogleHomeApi@response');
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
class DevicesApi extends ApiController{
|
class DevicesApi extends ApiController{
|
||||||
|
|
||||||
public function getAllDevices(){
|
public function default(){
|
||||||
$this->requireAuth();
|
$this->requireAuth();
|
||||||
$response = [];
|
$response = [];
|
||||||
|
|
||||||
|
13
app/api/RoomsApi.php
Normal file
13
app/api/RoomsApi.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class RoomsApi extends ApiController{
|
||||||
|
|
||||||
|
public function default(){
|
||||||
|
$this->requireAuth();
|
||||||
|
$response = [];
|
||||||
|
|
||||||
|
// TODO: process the request
|
||||||
|
|
||||||
|
$this->response($response);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user