refactoring, added rooms api

This commit is contained in:
xinatorus committed 2020-05-12 19:41:46 +02:00
1 parent 3981d9551d
commit c2203b452a
20 files changed
+18 -2

No files matched your search

+4 -1
View File
@@ -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');
+1 -1
View File
@@ -2,7 +2,7 @@
class DevicesApi extends ApiController{
public function getAllDevices(){
public function default(){
$this->requireAuth();
$response = [];
+13
View File
@@ -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.