mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
refactoring, added rooms api
This commit is contained in:
1 parent
3981d9551d
commit
c2203b452a
20 files changed
+18
-2
No files matched your search
+4
-1
@@ -14,8 +14,11 @@ $router->any('/automation', 'Automation');
|
||||
$router->any('/setting', 'Setting');
|
||||
$router->any('/ajax', 'Ajax');
|
||||
|
||||
$router->post('/api/devices', 'DevicesApi@getAllDevices');
|
||||
$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->any('/api/HA', 'GoogleHomeApi@response');
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
class DevicesApi extends ApiController{
|
||||
|
||||
public function getAllDevices(){
|
||||
public function default(){
|
||||
$this->requireAuth();
|
||||
$response = [];
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
class RoomsApi extends ApiController{
|
||||
|
||||
public function default(){
|
||||
$this->requireAuth();
|
||||
$response = [];
|
||||
|
||||
// TODO: process the request
|
||||
|
||||
$this->response($response);
|
||||
}
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user