Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

routes.php 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. use App\Http\DBO\CamotionPermissions;
  3. use Luticate\Auth\Business\LuticateBusiness;
  4. use Luticate\Doc\Business\LuDocBusiness;
  5. use Luticate\Utils\LuRoute;
  6. $route = LuRoute::getInstance();
  7. $int = LuRoute::REG_INT;
  8. $host_id = "{host_id:$int}";
  9. $camera_id = "{camera_id:$int}";
  10. $sensor_id = "{sensor_id:$int}";
  11. $command_id = "{command_id:$int}";
  12. LuticateBusiness::setupAuth();
  13. LuticateBusiness::setupRoutes();
  14. LuDocBusiness::setupRoutes("/camotion");
  15. $route->get("/hosts", "Hosts", "getAll", CamotionPermissions::HOST_GET);
  16. $route->get("/hosts/$host_id", "Hosts", "get", CamotionPermissions::HOST_GET);
  17. $route->post("/hosts/add", "Hosts", "add", array(CamotionPermissions::HOST_GET, CamotionPermissions::HOST_ADD));
  18. $route->post("/hosts/$host_id/edit", "Hosts", "edit", array(CamotionPermissions::HOST_GET, CamotionPermissions::HOST_EDIT));
  19. $route->post("/hosts/$host_id/del", "Hosts", "del", array(CamotionPermissions::HOST_GET, CamotionPermissions::HOST_DEL));
  20. $route->get("/cameras/types", "Cameras", "getAllTypes", array(CamotionPermissions::CAMERA_GET, CamotionPermissions::CAMERA_ADD));
  21. $route->get("/cameras", "Cameras", "getAll", CamotionPermissions::CAMERA_GET);
  22. $route->get("/cameras/$camera_id", "Cameras", "get", CamotionPermissions::CAMERA_GET);
  23. $route->post("/cameras/add", "Cameras", "add", array(CamotionPermissions::CAMERA_GET, CamotionPermissions::CAMERA_ADD));
  24. $route->post("/cameras/$camera_id/edit", "Cameras", "edit", array(CamotionPermissions::CAMERA_GET, CamotionPermissions::CAMERA_EDIT));
  25. $route->post("/cameras/$camera_id/del", "Cameras", "del", array(CamotionPermissions::CAMERA_GET, CamotionPermissions::CAMERA_DEL));
  26. $route->post("/cameras/$camera_id/image", "Cameras", "getImage", array(CamotionPermissions::CAMERA_GET, CamotionPermissions::CAMERA_EXEC));
  27. $route->get("/sensors/types", "Sensors", "getAllTypes", array(CamotionPermissions::SENSOR_GET, CamotionPermissions::SENSOR_ADD));
  28. $route->get("/sensors", "Sensors", "getAll", CamotionPermissions::SENSOR_GET);
  29. $route->get("/sensors/$sensor_id", "Sensors", "get", CamotionPermissions::SENSOR_GET);
  30. $route->post("/sensors/add", "Sensors", "add", array(CamotionPermissions::SENSOR_GET, CamotionPermissions::SENSOR_ADD));
  31. $route->post("/sensors/$sensor_id/edit", "Sensors", "edit", array(CamotionPermissions::SENSOR_GET, CamotionPermissions::SENSOR_EDIT));
  32. $route->post("/sensors/$sensor_id/del", "Sensors", "del", array(CamotionPermissions::SENSOR_GET, CamotionPermissions::SENSOR_DEL));
  33. $route->post("/sensors/$sensor_id/value", "Sensors", "getValue", array(CamotionPermissions::SENSOR_GET, CamotionPermissions::SENSOR_EXEC));
  34. $route->get("/commands/types", "Commands", "getAllTypes", array(CamotionPermissions::COMMAND_GET, CamotionPermissions::COMMAND_ADD));
  35. $route->get("/commands", "Commands", "getAll", CamotionPermissions::COMMAND_GET);
  36. $route->get("/commands/$command_id", "Commands", "get", CamotionPermissions::COMMAND_GET);
  37. $route->post("/commands/add", "Commands", "add", array(CamotionPermissions::COMMAND_GET, CamotionPermissions::COMMAND_ADD));
  38. $route->post("/commands/$command_id/edit", "Commands", "edit", array(CamotionPermissions::COMMAND_GET, CamotionPermissions::COMMAND_EDIT));
  39. $route->post("/commands/$command_id/del", "Commands", "del", array(CamotionPermissions::COMMAND_GET, CamotionPermissions::COMMAND_DEL));
  40. $route->post("/commands/$command_id/exec", "Commands", "exec", array(CamotionPermissions::COMMAND_GET, CamotionPermissions::COMMAND_EXEC));
  41. $route->get("/other/config", "Other", "configApp");
  42. //sleep(1);