addded routes

This commit is contained in:
2023-01-25 20:44:42 -05:00
parent 538bada3ad
commit f3be271ebd
2 changed files with 18 additions and 9 deletions
+12 -3
View File
@@ -39,7 +39,7 @@ $routes->get('/merms/wp/', 'Merms::index');
$routes->get('/chiefsoft/site/blogdata', 'Chiefsoft::blogdata'); // when no limit is sent $routes->get('/chiefsoft/site/blogdata', 'Chiefsoft::blogdata'); // when no limit is sent
$routes->post('/chiefsoft/site/contact', 'Chiefsoft::contact'); $routes->post('/chiefsoft/site/contact', 'Chiefsoft::contact');
//MERMS MYFIT //MERMS MYFIT NO SESSION DATA
$routes->get('/en/desktop/api/v2/myfit/country', 'Myfit::country'); $routes->get('/en/desktop/api/v2/myfit/country', 'Myfit::country');
$routes->get('/en/desktop/api/v2/myfit/blogdata/(:any)', 'Myfit::blogdata/$1'); $routes->get('/en/desktop/api/v2/myfit/blogdata/(:any)', 'Myfit::blogdata/$1');
$routes->get('/en/desktop/api/v2/myfit/blogdata', 'Myfit::blogdata'); // when no limit is sent $routes->get('/en/desktop/api/v2/myfit/blogdata', 'Myfit::blogdata'); // when no limit is sent
@@ -48,17 +48,26 @@ $routes->post('/en/desktop/api/v2/myfit/contact', 'Myfit::contact');
$routes->get('/en/desktop/api/v2/myfit/pricing', 'Myfit::pricing'); $routes->get('/en/desktop/api/v2/myfit/pricing', 'Myfit::pricing');
//MYFIT DESKTOP USERS //MYFIT DESKTOP USERS
//-- login
$routes->post('/en/desktop/api/v2/myfituser/login', 'Myfituser::users'); $routes->post('/en/desktop/api/v2/myfituser/login', 'Myfituser::users');
//--create acount
$routes->post('/en/desktop/api/v2/myfituser/account', 'Myfituser::users'); $routes->post('/en/desktop/api/v2/myfituser/account', 'Myfituser::users');
$routes->get('/en/desktop/api/v2/myfituser/profile', 'Myfituser::users');
$routes->get('/en/desktop/api/v2/myfituser/myfeed', 'Myfituser::users');
$routes->get('/en/desktop/api/v2/myfituser/tracking', 'Myfituser::users');
$routes->get('/en/desktop/api/v2/myfituser/reminders', 'Myfituser::users');
$routes->get('/en/desktop/api/v2/myfituser/calendar', 'Myfituser::users');
//MYFIT DESKTOP USERS //MYFIT DESKTOP USERS
$routes->post('/en/mobile/api/v2/myfituser/login', 'Myfituser::users'); $routes->post('/en/mobile/api/v2/myfituser/login', 'Myfituser::users');
$routes->post('/en/mobile/api/v2/myfituser/account', 'Myfituser::users'); $routes->post('/en/mobile/api/v2/myfituser/account', 'Myfituser::users');
$routes->get('/en/mobile/api/v2/myfit/blogdata', 'Myfit::blogdata'); $routes->get('/en/mobile/api/v2/myfit/blogdata', 'Myfit::blogdata');
$routes->get('/en/desktop/api/v2/myfituser/profile', 'Myfituser::users');
$routes->get('/en/desktop/api/v2/myfituser/myfeed', 'Myfituser::users');
/* /*
https://devapi.mermsemr.com/en/desktop/api/v2/myfit/country GET https://devapi.mermsemr.com/en/desktop/api/v2/myfit/country GET
+6 -6
View File
@@ -18,17 +18,17 @@ class userAccess extends Model
public function startLogin($in) public function startLogin($in)
{ {
$sqlQ = $sqlQ =
'SELECT m.*,mp.* FROM members m LEFT JOIN members_profile mp ON m.id=mp.member_id WHERE m.id =12'; 'SELECT m.id as member_id, m.*,mp.* FROM members m LEFT JOIN members_profile mp ON m.id=mp.member_id WHERE m.id =12';
$query = $this->db->query($sqlQ); $query = $this->db->query($sqlQ);
$data['test_data'] = $query->getResultArray(); $data['profile_data'] = $query->getResultArray();
if (count($data['test_data']) == 1) { if (count($data['profile_data']) == 1) {
$data['test_data'][0]['password'] = '**REMOVED**'; $data['profile_data'][0]['password'] = '**REMOVED**';
$member_id = $data['test_data'][0]['id']; $member_id = $data['profile_data'][0]['member_id'];
return $inx = [ return $inx = [
'session_token' => $this->generateSession($member_id), 'session_token' => $this->generateSession($member_id),
'member_id'=> $member_id, 'member_id'=> $member_id,
'profile' => $data['test_data'], 'profile' => $data['profile_data'],
'settings' => [], 'settings' => [],
'preferences' => [], 'preferences' => [],
'status' => 1, 'status' => 1,