prod env added
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#--------------------------------------------------------------------
|
||||
# ENVIRONMENT
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
CI_ENVIRONMENT = production
|
||||
UID=1000
|
||||
MYSQL_ROOT_PASSWORD=cod31gn1t3
|
||||
MYSQL_DATABASE=codeigniter_db
|
||||
CI_ENVIRONMENT=production
|
||||
|
||||
|
||||
MYFIT_DATABASE_HOSTNAME='10.20.30.60'
|
||||
MYFIT_DATABASE_USERNAME='myfit'
|
||||
MYFIT_DATABASE_PASSWORD='myfit'
|
||||
MYFIT_DATABASE='myfit_prod'
|
||||
@@ -79,7 +79,7 @@ $routes->get('/en/desktop/api/v2/myfituser/remcategory', 'Myfituser::users');
|
||||
$routes->get('/en/desktop/api/v2/myfituser/remmode', 'Myfituser::users');
|
||||
$routes->post('/en/desktop/api/v2/myfituser/editreminder', 'Myfituser::users'); // save create a reminder item
|
||||
|
||||
$routes->get('/en/desktop/api/v2/myfituser/calendar', 'Myfituser::users');
|
||||
|
||||
$routes->get('/en/desktop/api/v2/myfituser/loginhx', 'Myfituser::users');
|
||||
$routes->get('/en/desktop/api/v2/myfituser/stats', 'Myfituser::users');
|
||||
$routes->get('/en/desktop/api/v2/myfituser/resources', 'Myfituser::users');
|
||||
@@ -87,6 +87,10 @@ $routes->get('/en/desktop/api/v2/myfituser/resources', 'Myfituser::users');
|
||||
$routes->post('/en/desktop/api/v2/myfituser/resetpass-profile', 'Myfituser::users'); // resetpass-profile
|
||||
|
||||
|
||||
$routes->get('/en/desktop/api/v2/myfituser/calendar', 'Myfituser::users'); // please use post
|
||||
$routes->post('/en/desktop/api/v2/myfituser/calendar', 'Myfituser::users'); // USE THIS PONE
|
||||
|
||||
|
||||
$routes->get('/en/desktop/api/v2/myfituser/home-stats', 'Myfituser::users');
|
||||
|
||||
|
||||
|
||||
@@ -63,7 +63,8 @@ class Myfituser extends BaseController
|
||||
'tracking' => ['POST'],
|
||||
'trackinghx' => ['GET'],
|
||||
'resetpass-profile' => ['POST'],
|
||||
'home-stats' => ['GET']
|
||||
'home-stats' => ['GET'],
|
||||
'calendar' => ['POST']
|
||||
];
|
||||
|
||||
$res1 = [];
|
||||
@@ -118,9 +119,9 @@ class Myfituser extends BaseController
|
||||
case 'myfeed':
|
||||
$res1 = $this->dummyData($raw_array);
|
||||
break;
|
||||
case 'calendar':
|
||||
$res1 = $this->dummyData($raw_array);
|
||||
break;
|
||||
// case 'calendar':
|
||||
// $res1 = $this->dummyData($raw_array);
|
||||
// break;
|
||||
case 'resetpass': // reset password after login steps
|
||||
$res1 = $this->dummyData($raw_array);
|
||||
break;
|
||||
@@ -153,7 +154,11 @@ class Myfituser extends BaseController
|
||||
break;
|
||||
|
||||
case 'home-stats':
|
||||
$res1 = ( new \App\Models\userStats() )->homeStats($raw_array);
|
||||
$res1 = ( new \App\Models\userStats() )->homeStats($raw_array);
|
||||
break;
|
||||
|
||||
case 'calendar':
|
||||
$res1 = (new \App\Models\userCalendar)->readCalendar($raw_array);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class userCalendar extends baseModel
|
||||
{
|
||||
// protected $db;
|
||||
// public $con_name = 'mermsemr';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
// $this->db = \Config\Database::connect($this->con_name);
|
||||
}
|
||||
|
||||
public function readCalendar($in)
|
||||
{
|
||||
$member_id =
|
||||
(isset($in['member_id']) && (int)$in['member_id'] > 0)
|
||||
? (int)$in['member_id']
|
||||
: 0;
|
||||
$sqlQ = "SELECT 'REMINDER' AS cal,description,start_date,category,uuid FROM members_reminders
|
||||
WHERE member_id = $member_id AND start_date BETWEEN '".$in['start_date']."' AND '".$in['end_date']."' ";
|
||||
$query = $this->db->query($sqlQ);
|
||||
$data['reminders_data'] = $query->getResultArray();
|
||||
return $inx = [
|
||||
'reminders' => $data['reminders_data'],
|
||||
'status' => 1,
|
||||
'raw_data' => $in,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
public function update_db($UupdateDataArray,$whereAray, $updateTable)
|
||||
$sql = "INSERT INTO table (title) VALUES('" . $db->escapeString($title) . "')";
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user