resetpass dummy implementation
This commit is contained in:
@@ -48,7 +48,7 @@ $routes->post('/en/desktop/api/v2/myfit/contact', 'Myfit::contact');
|
||||
$routes->get('/en/desktop/api/v2/myfit/pricing', 'Myfit::pricing');
|
||||
|
||||
//reset pass & login
|
||||
$routes->post('/en/desktop/api/v2/myfituser/resetpass', 'Myfitauth::resetpass');
|
||||
$routes->post('/en/desktop/api/v2/myfituser/resetpass', 'Myfitauth::users');
|
||||
//MYFIT DESKTOP USERS
|
||||
//-- login
|
||||
$routes->post('/en/desktop/api/v2/myfituser/login', 'Myfitauth::users');
|
||||
|
||||
@@ -17,7 +17,7 @@ class Myfituser extends BaseController
|
||||
|
||||
public function index()
|
||||
{
|
||||
/* header('Access-Control-Allow-Origin: * ');
|
||||
/* header('Access-Control-Allow-Origin: * ');
|
||||
//header("Access-Control-Allow-Origin: http://localhost:9057 ");
|
||||
header('Access-Control-Expose-Headers: Access-Control-Allow-Origin');
|
||||
header('Access-Control-Allow-Credentials: true ');
|
||||
@@ -55,8 +55,14 @@ class Myfituser extends BaseController
|
||||
'calendar' => ['GET'],
|
||||
'profile' => ['GET'],
|
||||
'loginhx' => ['GET'],
|
||||
|
||||
];
|
||||
|
||||
// Retrieve an HTTP Request header, with case-insensitive names
|
||||
$this->request->getHeader('host');
|
||||
$this->request->getHeader('Content-Type');
|
||||
//$au = $this->request->getHeader('Authorization');
|
||||
|
||||
$res1 = [];
|
||||
if (array_key_exists($endpoint, $endpoints)) {
|
||||
} else {
|
||||
@@ -67,14 +73,15 @@ class Myfituser extends BaseController
|
||||
// echo "EXYTACT INPUT DATA HERE";
|
||||
$raw_json = file_get_contents('php://input');
|
||||
$raw_array = json_decode($raw_json, true);
|
||||
//$raw_array['au'] =$au;
|
||||
|
||||
switch ($endpoint) {
|
||||
case 'login':
|
||||
// $userAccess = new \App\Models\userAccess();
|
||||
// $res1 = $userAccess->startLogin($raw_array);
|
||||
//$userAccess = new \App\Models\userAccess();
|
||||
//$res1 = $userAccess->startLogin($raw_array);
|
||||
break;
|
||||
case 'account':
|
||||
// $res = $this->dummyData($raw_array);
|
||||
// $res = $this->dummyData($raw_array);
|
||||
break;
|
||||
case 'reminders':
|
||||
$myfitUserReminders = new \App\Models\myfitUserReminders();
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
|
||||
class myfitResetPass extends Model
|
||||
{
|
||||
protected $db;
|
||||
public $con_name = 'mermsemr';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
//$db = \Config\Database::connect('mermsemr');
|
||||
$this->db = \Config\Database::connect($this->con_name);
|
||||
}
|
||||
|
||||
public function resetPass($in)
|
||||
{
|
||||
$reminder_category =[];
|
||||
$sqlQ =
|
||||
'SELECT * FROM members_resetpass';
|
||||
|
||||
|
||||
$query = $this->db->query($sqlQ);
|
||||
$data['resetpass_data'] = $query->getResultArray();
|
||||
return $inx = [
|
||||
'reminder_category' => $reminder_category,
|
||||
'reminders' => $data['resetpass_data'],
|
||||
'status' => 1,
|
||||
'raw_data' => $in,
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user