From 026bd6e2471a84c0f70fba4959596e3aae90b066 Mon Sep 17 00:00:00 2001 From: Alexei Karpenko Date: Mon, 15 Dec 2025 18:00:05 +0100 Subject: [PATCH] moved issues controller to another folder --- .../controllers/api/frontend/v1/Issues.php | 56 ------------------- public/js/api/factory/issues.js | 2 +- 2 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 application/controllers/api/frontend/v1/Issues.php diff --git a/application/controllers/api/frontend/v1/Issues.php b/application/controllers/api/frontend/v1/Issues.php deleted file mode 100644 index 2e63ffeb1..000000000 --- a/application/controllers/api/frontend/v1/Issues.php +++ /dev/null @@ -1,56 +0,0 @@ - Self::DEFAULT_PERMISSION - ) - ); - - // Loads authentication library and starts authenticationfetc - $this->load->library('AuthLib'); - - $this->load->model('extensions/FHC-Core-Personalverwaltung/Api_model','ApiModel'); - $this->load->model('person/Person_model','PersonModel'); - $this->load->model('system/Fehler_model','FehlerModel'); - $this->load->model('system/Issue_model', 'IssueModel'); - $this->load->model('person/Benutzer_model', 'BenutzerModel'); - - // get CI for transaction management - $this->CI = &get_instance(); - } - - public function getOpenIssuesByProperties() - { - $person_id = $this->input->get('person_id', true); - $oe_kurzbz = $this->input->get('oe_kurzbz', true); - $fehlertyp_kurzbz = $this->input->get('fehlertyp_kurzbz', true); - $apps = $this->input->get('apps', true); - $behebung_parameter = $this->input->get('behebung_parameter', true); - - if (isset($person_id) && !is_numeric($person_id)) - $this->terminateWithError('person id is not numeric!'); - - if (isset($behebung_parameter) && !is_array($behebung_parameter)) - $this->terminateWithError('Behebung parameter invalid'); - - $issueRes = $this->IssueModel->getOpenIssuesByProperties($person_id, $oe_kurzbz, $fehlertyp_kurzbz, $apps, $behebung_parameter); - - if (isError($issueRes)) - { - $this->terminateWithError(getError($issueRes)); - } - - $this->terminateWithSuccess(hasData($issueRes) ? getData($issueRes) : []); - } -} \ No newline at end of file diff --git a/public/js/api/factory/issues.js b/public/js/api/factory/issues.js index 1279cc232..72836b0b5 100644 --- a/public/js/api/factory/issues.js +++ b/public/js/api/factory/issues.js @@ -4,7 +4,7 @@ export default { { return { method: 'get', - url: '/api/frontend/v1/issues/getOpenIssuesByProperties', + url: '/api/frontend/v1/issues/Issues/getOpenIssuesByProperties', params: { person_id, oe_kurzbz, fehlertyp_kurzbz, apps, behebung_parameter } }; }