diff --git a/server/SHServ/Controllers/AppController.php b/server/SHServ/Controllers/AppController.php new file mode 100644 index 0000000..3289976 --- /dev/null +++ b/server/SHServ/Controllers/AppController.php @@ -0,0 +1,16 @@ +Version {$server_version}"; + } + + public function text_msgs() { + return $this -> utils() -> response_success([ + "text_msgs" => FCONF["text_msgs"] + ]); + } +} \ No newline at end of file diff --git a/server/SHServ/Routes.php b/server/SHServ/Routes.php index d11e6ce..c8a408b 100644 --- a/server/SHServ/Routes.php +++ b/server/SHServ/Routes.php @@ -56,12 +56,11 @@ } protected function uri_routes() { - $this -> router -> uri("/", function(){ - return "Smart home server.
Version 0.1 dev"; - }); + $this -> router -> uri("/", "{$this -> cn}\\AppController@index"); $this -> router -> uri("/cron/regular-scripts", "{$this -> cn}\\CronController@run_regular_cron_scripts"); $this -> router -> uri("/cron/status-update-scanning", "{$this -> cn}\\CronController@status_update_scanning"); + $this -> router -> uri("/text-msgs", "{$this -> cn}\\AppController@text_msgs"); } protected function get_routes() { diff --git a/server/SHServ/config.php b/server/SHServ/config.php index d9baa6c..0be1040 100644 --- a/server/SHServ/config.php +++ b/server/SHServ/config.php @@ -2,6 +2,7 @@ return [ "app_name" => "SHServ", + "version" => "0.2 dev", "debug" => true, "default_db_wrap" => false, "db" => [ diff --git a/webclient/index.php b/webclient/index.php index 609a839..c864a47 100644 --- a/webclient/index.php +++ b/webclient/index.php @@ -6,6 +6,14 @@ SHServ Web Client + + +