BY-186 Cambiar los endpoints de bookmarks que se encuentran en users, para pasar a cases
This commit is contained in:
@@ -1110,4 +1110,42 @@ class Cases extends Api
|
|||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mark a task process as a bookmark
|
||||||
|
* @url POST /bookmark/:tas_uid
|
||||||
|
*
|
||||||
|
* @param string $tas_uid {@min 32}{@max 32}
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function doPostBookmarkStartCase($tas_uid)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$userLoggedUid = $this->getUserId();
|
||||||
|
$user = new \ProcessMaker\BusinessModel\User();
|
||||||
|
$user->updateBookmark($userLoggedUid, $tas_uid, 'INSERT');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a task process from bookmarks
|
||||||
|
* @url DELETE /bookmark/:tas_uid
|
||||||
|
*
|
||||||
|
* @param string $tas_uid {@min 32}{@max 32}
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function doDeleteBookmarkStartCase($tas_uid)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$userLoggedUid = $this->getUserId();
|
||||||
|
$user = new \ProcessMaker\BusinessModel\User();
|
||||||
|
$user->updateBookmark($userLoggedUid, $tas_uid, 'DELETE');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,43 +143,5 @@ class User extends Api
|
|||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Save Bookmark start case
|
|
||||||
* @url POST /bookmark/:tas_uid
|
|
||||||
*
|
|
||||||
* @param string $tas_uid {@min 32}{@max 32}
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function doPostBookmarkStartCase($tas_uid)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
$userLoggedUid = $this->getUserId();
|
|
||||||
$user = new \ProcessMaker\BusinessModel\User();
|
|
||||||
$user->updateBookmark($userLoggedUid, $tas_uid, 'INSERT');
|
|
||||||
return array('bookmarkedTaskId'=>$tas_uid);
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete Bookmark start case
|
|
||||||
* @url DELETE /bookmark/:tas_uid
|
|
||||||
*
|
|
||||||
* @param string $tas_uid {@min 32}{@max 32}
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function doDeleteBookmarkStartCase($tas_uid)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
$userLoggedUid = $this->getUserId();
|
|
||||||
$user = new \ProcessMaker\BusinessModel\User();
|
|
||||||
$user->updateBookmark($userLoggedUid, $tas_uid, 'DELETE');
|
|
||||||
return array('unbookmarkedTaskId'=>$tas_uid);
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user