123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
-
- use App\Http\DBO\CamotionPermissions;
- use Luticate\Auth\Business\LuticateBusiness;
- use Luticate\Doc\Business\LuDocBusiness;
- use Luticate\Utils\LuRoute;
-
- $route = LuRoute::getInstance();
-
- $int = LuRoute::REG_INT;
- $host_id = "{host_id:$int}";
- $camera_id = "{camera_id:$int}";
- $sensor_id = "{sensor_id:$int}";
- $command_id = "{command_id:$int}";
-
- LuticateBusiness::setupAuth();
- LuticateBusiness::setupRoutes();
- LuDocBusiness::setupRoutes("/camotion");
-
- $route->get("/hosts", "Hosts", "getAll", CamotionPermissions::HOST_GET);
- $route->get("/hosts/$host_id", "Hosts", "get", CamotionPermissions::HOST_GET);
- $route->post("/hosts/add", "Hosts", "add", array(CamotionPermissions::HOST_GET, CamotionPermissions::HOST_ADD));
- $route->post("/hosts/$host_id/edit", "Hosts", "edit", array(CamotionPermissions::HOST_GET, CamotionPermissions::HOST_EDIT));
- $route->post("/hosts/$host_id/del", "Hosts", "del", array(CamotionPermissions::HOST_GET, CamotionPermissions::HOST_DEL));
-
-
- $route->get("/cameras/types", "Cameras", "getAllTypes", array(CamotionPermissions::CAMERA_GET, CamotionPermissions::CAMERA_ADD));
- $route->get("/cameras", "Cameras", "getAll", CamotionPermissions::CAMERA_GET);
- $route->get("/cameras/$camera_id", "Cameras", "get", CamotionPermissions::CAMERA_GET);
- $route->post("/cameras/add", "Cameras", "add", array(CamotionPermissions::CAMERA_GET, CamotionPermissions::CAMERA_ADD));
- $route->post("/cameras/$camera_id/edit", "Cameras", "edit", array(CamotionPermissions::CAMERA_GET, CamotionPermissions::CAMERA_EDIT));
- $route->post("/cameras/$camera_id/del", "Cameras", "del", array(CamotionPermissions::CAMERA_GET, CamotionPermissions::CAMERA_DEL));
- $route->post("/cameras/$camera_id/image", "Cameras", "getImage", array(CamotionPermissions::CAMERA_GET, CamotionPermissions::CAMERA_EXEC));
-
-
- $route->get("/sensors/types", "Sensors", "getAllTypes", array(CamotionPermissions::SENSOR_GET, CamotionPermissions::SENSOR_ADD));
- $route->get("/sensors", "Sensors", "getAll", CamotionPermissions::SENSOR_GET);
- $route->get("/sensors/$sensor_id", "Sensors", "get", CamotionPermissions::SENSOR_GET);
- $route->post("/sensors/add", "Sensors", "add", array(CamotionPermissions::SENSOR_GET, CamotionPermissions::SENSOR_ADD));
- $route->post("/sensors/$sensor_id/edit", "Sensors", "edit", array(CamotionPermissions::SENSOR_GET, CamotionPermissions::SENSOR_EDIT));
- $route->post("/sensors/$sensor_id/del", "Sensors", "del", array(CamotionPermissions::SENSOR_GET, CamotionPermissions::SENSOR_DEL));
- $route->post("/sensors/$sensor_id/value", "Sensors", "getValue", array(CamotionPermissions::SENSOR_GET, CamotionPermissions::SENSOR_EXEC));
-
-
- $route->get("/commands/types", "Commands", "getAllTypes", array(CamotionPermissions::COMMAND_GET, CamotionPermissions::COMMAND_ADD));
- $route->get("/commands", "Commands", "getAll", CamotionPermissions::COMMAND_GET);
- $route->get("/commands/$command_id", "Commands", "get", CamotionPermissions::COMMAND_GET);
- $route->post("/commands/add", "Commands", "add", array(CamotionPermissions::COMMAND_GET, CamotionPermissions::COMMAND_ADD));
- $route->post("/commands/$command_id/edit", "Commands", "edit", array(CamotionPermissions::COMMAND_GET, CamotionPermissions::COMMAND_EDIT));
- $route->post("/commands/$command_id/del", "Commands", "del", array(CamotionPermissions::COMMAND_GET, CamotionPermissions::COMMAND_DEL));
- $route->post("/commands/$command_id/exec", "Commands", "exec", array(CamotionPermissions::COMMAND_GET, CamotionPermissions::COMMAND_EXEC));
-
- $route->get("/other/config", "Other", "configApp");
- //sleep(1);
|