ENTITY FIXED

This commit is contained in:
velz 2018-10-05 17:54:13 +05:30
parent b9bb92a685
commit d9230fc4c4
3 changed files with 11 additions and 7 deletions

View File

@ -85,8 +85,8 @@ defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automat
defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
// define login route name for token verification // 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', '(listLessPDDetails/:any)'); // no errors
//defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', '(listAllEntites/:any)'); // no errors defined('ROUTE_LOGIN') OR define('ROUTE_LOGIN', 'saveNewEntity'); // no errors
/*********************AWS resources Constants*************************************************/ /*********************AWS resources Constants*************************************************/
defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic'); defined('PROFILE_PICTURE_BUCKET_NAME') OR define('PROFILE_PICTURE_BUCKET_NAME','sineedgedevprofilepic');

View File

@ -80,10 +80,14 @@ class Entity_Management_Controller extends REST_Controller {
if($entity_id != '' || $entity_id != null) if($entity_id != '' || $entity_id != null)
{ {
if($records['fk_entity_type_id'] == 2)// If New Entity is Lender(2) type, then create a S3 bucket for corresponding lender.
// If New Entity is Lender(2) type, then create a S3 bucket for corresponding lender.
if($records['fk_entity_type_id'] == 2)
{ {
//echo "LENDER TYPE";
$bucket_name = 'lender'.$entity_id; $bucket_name = 'lender'.$entity_id;
$bucket_status = $this->aws_s3->createNewBucket($bucket_name); $bucket_status = $this->aws_s3->createNewBucket($bucket_name);
//print_r($bucket_status);
} }
} }

View File

@ -44,13 +44,13 @@ class AWS_S3
{ {
try { try {
$result = $this->S3->createBucket(['Bucket' => $BUCKET_NAME,'ACL' => 'authenticated-read']); $result = $this->S3->createBucket(['ACL' => 'authenticated-read','Bucket' => $BUCKET_NAME]);
//print_r($result); return $result;
} catch (AwsException $e) { } catch (AwsException $e) {
// output error message if fails // output error message if fails
echo $e->getMessage(); // echo $e->getMessage();
echo "\n"; // echo "\n";
} }
} }