From d01dedb79c0cd6fa8b62f939b1df45272a570441 Mon Sep 17 00:00:00 2001 From: chfhtw Date: Mon, 23 Mar 2026 11:23:01 +0100 Subject: [PATCH] remove unused file --- application/controllers/dashboard/Api.php | 76 ----------------------- 1 file changed, 76 deletions(-) delete mode 100644 application/controllers/dashboard/Api.php diff --git a/application/controllers/dashboard/Api.php b/application/controllers/dashboard/Api.php deleted file mode 100644 index 422bf0675..000000000 --- a/application/controllers/dashboard/Api.php +++ /dev/null @@ -1,76 +0,0 @@ - 'dashboard/admin:rw', - 'getNews' => 'dashboard/benutzer:r', - 'getAmpeln' => 'dashboard/benutzer:r', - ) - ); - - $this->load->library('AuthLib', null, 'AuthLib'); - - $this->_setAuthUID(); - } - - public function index() - { - echo 'Dashboard API Controller'; - } - - /** - * Get News. - */ - public function getNews() - { - $limit = $this->input->get('limit'); - - $this->load->model('content/News_model', 'NewsModel'); - - $result = $this->NewsModel->getAll($limit); - - if (hasData($result)) - { - $this->outputJson(getData($result), REST_Controller::HTTP_OK); - } - else - { - $this->terminateWithJsonError('fehler entdeckt'); - } - } - - - /** - * Get Ampeln. - */ - public function getAmpeln() - { - - $this->load->model('content/Ampel_model', 'AmpelModel'); - $result = $this->AmpelModel->getByUser($this->_uid); - - if (hasData($result)) - { - $this->outputJson(getData($result), REST_Controller::HTTP_OK); - } - else - { - $this->terminateWithJsonError('fehler entdeckt'); - } - } - - /** - * Retrieve the UID of the logged user and checks if it is valid - */ - private function _setAuthUID() - { - $this->_uid = getAuthUID(); - - if (!$this->_uid) show_error('User authentification failed'); - } -}