Merged in bugfix/PMCORE-3243 (pull request #8072)

PMCORE-3243

Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
Paula Quispe
2021-08-26 16:24:15 +00:00
committed by Julio Cesar Laura Avendaño
4 changed files with 8 additions and 9 deletions

View File

@@ -1073,19 +1073,19 @@ class Cases
* @access public
* @param string $app_uid , Uid for case
* @param string $usr_uid , Uid for user
* @param bool|string $del_index
* @param int $del_index
*
* @return void
* @throws Exception
*/
public function putUnpauseCase($appUid, $usrUid, $index = false)
public function putUnpauseCase($appUid, $usrUid, $index = 0)
{
Validator::isString($appUid, '$app_uid');
Validator::isString($usrUid, '$usr_uid');
Validator::appUid($appUid, '$app_uid');
Validator::usrUid($usrUid, '$usr_uid');
if ($index === false) {
if ($index === 0) {
$index = AppDelegation::getCurrentIndex($appUid);
}
Validator::isInteger($index, '$del_index');

View File

@@ -994,18 +994,19 @@ class Cases extends Api
* @url PUT /:appUid/unpause
*
* @param string $appUid {@min 1}{@max 32}
* @param int $index {@from body}
*
* @throws RestException
*
* @access protected
* @class AccessControl {@permission PM_CASES}
*/
public function doPutUnpauseCase($appUid)
public function doPutUnpauseCase($appUid, $index = 0)
{
try {
$userUid = $this->getUserId();
$cases = new BmCases();
$cases->putUnpauseCase($appUid, $userUid);
$cases->putUnpauseCase($appUid, $userUid, $index);
} catch (Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}