Reset pass

This commit is contained in:
2023-03-04 10:01:59 -05:00
parent 85a20fc52a
commit 02e9eee332
8 changed files with 242 additions and 44 deletions
+14 -2
View File
@@ -43,6 +43,7 @@ class Myfituser extends BaseController
$psc = count($pieces);
$endpoint = $psc > 0 ? $pieces[$psc - 1] : '';
log_message('critical', "Enpoint-> ".$endpoint );
$endpoints = [
'account' => ['POST'],
@@ -60,7 +61,9 @@ class Myfituser extends BaseController
'trackcategory' => ['GET'],
'resetpass' => ['POST'],
'tracking' => ['POST'],
'trackinghx' => ['GET']
'trackinghx' => ['GET'],
'resetpass-profile' => ['POST'],
'home-stats' => ['GET']
];
$res1 = [];
@@ -83,7 +86,7 @@ class Myfituser extends BaseController
}
// $raw_array['fff'] = json_decode($this->request->getJSON(), true);
log_message('critical', "Enpoint LOC2-> ".$endpoint );
switch ($endpoint) {
case 'login':
//$userAccess = new \App\Models\userAccess();
@@ -143,6 +146,15 @@ class Myfituser extends BaseController
$myfitTracking = new \App\Models\myfitTracking();
$res1 = $myfitTracking->readTracking($raw_array);
break;
case 'resetpass-profile':
// $res1 = $this->dummyData($raw_array);
$res1 = ( new \App\Models\myfitUserProfile() )->resetPassword($raw_array);
break;
case 'home-stats':
$res1 = ( new \App\Models\userStats() )->homeStats($raw_array);
break;
}
return $this->response->setJson($res1);