Merged in feature/HOR-4508 (pull request #6649)
HOR-4508 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -23,6 +23,7 @@ use ProcessMaker\Project\Adapter;
|
||||
use ProcessMaker\Services\Api;
|
||||
use ProcessMaker\Services\Api\Project\Activity\Step;
|
||||
use ProcessMaker\Util\DateTime;
|
||||
use ProcessMaker\Validation\ExceptionRestApi;
|
||||
use RBAC;
|
||||
use stdclass;
|
||||
use StepPeer;
|
||||
@@ -1466,10 +1467,11 @@ class Light extends Api
|
||||
$userUid = $this->getUserId();
|
||||
$oMobile = new BusinessModelLight();
|
||||
$filesUids = $oMobile->postUidUploadFiles($userUid, $app_uid, $request_data);
|
||||
} catch (ExceptionRestApi $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
|
||||
return $filesUids;
|
||||
}
|
||||
|
||||
@@ -1500,11 +1502,12 @@ class Light extends Api
|
||||
try {
|
||||
$userUid = $this->getUserId();
|
||||
$oMobile = new BusinessModelLight();
|
||||
$response = $oMobile->documentUploadFiles($userUid, $app_uid, $app_doc_uid, $request_data);
|
||||
$response = $oMobile->documentUploadFiles($userUid, $app_uid, $app_doc_uid);
|
||||
} catch (ExceptionRestApi $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
<?php
|
||||
namespace ProcessMaker\Services\Api\Project;
|
||||
|
||||
use \ProcessMaker\Services\Api;
|
||||
use \Luracast\Restler\RestException;
|
||||
use Exception;
|
||||
use Luracast\Restler\RestException;
|
||||
use ProcessMaker\BusinessModel\FilesManager as FilesManagerBusinessModel;
|
||||
use ProcessMaker\Services\Api;
|
||||
use ProcessMaker\Validation\ExceptionRestApi;
|
||||
|
||||
/**
|
||||
* Project\ProjectUsers Api Controller
|
||||
@@ -57,11 +60,13 @@ class FilesManager extends Api
|
||||
$userUid = $this->getUserId();
|
||||
$request_data = (array)($request_data);
|
||||
$request_data = array_merge(array('prf_content' => $prf_content ), $request_data);
|
||||
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
|
||||
$filesManager = new FilesManagerBusinessModel();
|
||||
$arrayData = $filesManager->addProcessFilesManager($prj_uid, $userUid, $request_data);
|
||||
//Response
|
||||
$response = $arrayData;
|
||||
} catch (\Exception $e) {
|
||||
} catch (ExceptionRestApi $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
//response
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
@@ -85,11 +90,13 @@ class FilesManager extends Api
|
||||
public function doPostProcessFilesManagerUpload($prj_uid, $prf_uid)
|
||||
{
|
||||
try {
|
||||
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
|
||||
$filesManager = new FilesManagerBusinessModel();
|
||||
$sData = $filesManager->uploadProcessFilesManager($prj_uid, $prf_uid);
|
||||
//Response
|
||||
$response = $sData;
|
||||
} catch (\Exception $e) {
|
||||
} catch (ExceptionRestApi $e) {
|
||||
throw new RestException($e->getCode(), $e->getMessage());
|
||||
} catch (Exception $e) {
|
||||
//response
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user