Преглед на файлове

Add API configuration to config file and update api_model to use config values

szisz1982 преди 1 седмица
родител
ревизия
7813820faf
променени са 2 файла, в които са добавени 5 реда и са изтрити 2 реда
  1. 3 0
      application/config/config.php
  2. 2 2
      application/models/api_model.php

+ 3 - 0
application/config/config.php

@@ -17,4 +17,7 @@ $config['db_name'] = 'openws'; // Database name
 $config['db_username'] = 'openws'; // Database username
 $config['db_password'] = '5jqPQEPGUihnY5XM6oPR'; // Database password
 
+$config['api_url'] = 'https://szollosil.bbus.smbinfo.hu/api/index.php';
+$config['api_key'] = '92JxvN5Zeti4E1FDwKg0QPEl3md4vY63';
+
 ?>

+ 2 - 2
application/models/api_model.php

@@ -2,8 +2,8 @@
 
 class api_model extends Model {
 
-  const API = 'https://szollosil.bbus.smbinfo.hu/api/index.php';
-  const API_KEY = '92JxvN5Zeti4E1FDwKg0QPEl3md4vY63';
+  const API = $config['api_url'];
+  const API_KEY = $config['api_key'];
 
   public function getGroupsList() {
     $curl = curl_init();