DB CHANGES
This commit is contained in:
parent
35f2a136d5
commit
7a6e01e562
@ -86,7 +86,7 @@ defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest auto
|
||||
|
||||
// define login route name for token verification
|
||||
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listLessPDDetails/:any)'); // no errors
|
||||
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'getListOfPDAllocationTypes'); // no errors
|
||||
defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'saveCompany'); // no errors
|
||||
|
||||
/*********************AWS resources Constants*************************************************/
|
||||
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');
|
||||
|
||||
@ -100,10 +100,10 @@ $db['dev'] = array(
|
||||
|
||||
$db['test'] = array(
|
||||
'dsn' => '',
|
||||
'hostname' => 'apollodec.com',
|
||||
'username' => 'apollod4_DEV',
|
||||
'password' => 'apollo1234',
|
||||
'database' => 'apollod4_ApolloDECDev',
|
||||
'hostname' => 'sine-edge-dev.cya6cheplup2.ap-south-1.rds.amazonaws.com',
|
||||
'username' => 'asparqdev_mas001',
|
||||
'password' => 'sparqvenba',
|
||||
'database' => 'sine_edge_test',
|
||||
'dbdriver' => 'mysqli',
|
||||
'dbprefix' => '',
|
||||
'pconnect' => FALSE,
|
||||
|
||||
@ -538,16 +538,15 @@ class Common_Masters_Controller extends REST_Controller {
|
||||
* Company File Upload
|
||||
*/
|
||||
public function saveCompany_post(){
|
||||
//echo "function in";
|
||||
|
||||
$records = json_decode($this->post('records'),true);
|
||||
|
||||
if(!empty($_FILES['logo']['tmp_name']))
|
||||
{
|
||||
|
||||
$logo = $_FILES['logo']['tmp_name'];
|
||||
$logoname = $_FILES['logo']['name'];
|
||||
$logoname = strtolower($logoname);
|
||||
$logos3path = "";
|
||||
//$logos3path = "";
|
||||
$logos3path = 'sineedge/'.$logoname;
|
||||
$bucketname = PROFILE_PICTURE_BUCKET_NAME;
|
||||
$key = $logos3path;
|
||||
@ -555,7 +554,7 @@ class Common_Masters_Controller extends REST_Controller {
|
||||
|
||||
$bucket_data = array('bucket_name'=>$bucketname,'key'=>$key,'sourcefile'=>$sourcefile);
|
||||
$s3result= $this->aws_s3->uploadFileToS3Bucket($bucket_data);
|
||||
|
||||
print_r($s3result);
|
||||
if(is_object($s3result) && $s3result['ObjectURL'] != '' && $s3result['@metadata']['statusCode'] == 200)
|
||||
{
|
||||
$records['logo'] = $logoname;
|
||||
@ -571,11 +570,9 @@ class Common_Masters_Controller extends REST_Controller {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$result = $this->Common_Masters_Model->saveRecords($records,COMPANY);
|
||||
|
||||
if(count($result) > 0)
|
||||
if($result != "" || $result != null)
|
||||
{
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user