feat: Implement eviction lawsuit initiation from Kündigung with related data handling
This commit is contained in:
@@ -2,6 +2,26 @@
|
||||
|
||||
namespace Espo\Custom\Controllers;
|
||||
|
||||
use Espo\Core\Exceptions\BadRequest;
|
||||
use Espo\Core\Api\Request;
|
||||
|
||||
class CKuendigung extends \Espo\Core\Templates\Controllers\BasePlus
|
||||
{
|
||||
/**
|
||||
* POST Action: Initiate eviction lawsuit from Kündigung
|
||||
*/
|
||||
public function postActionInitiateEviction(Request $request): array
|
||||
{
|
||||
$data = $request->getParsedBody();
|
||||
|
||||
$id = $data->id ?? null;
|
||||
if (!$id) {
|
||||
throw new BadRequest('No Kündigung ID provided');
|
||||
}
|
||||
|
||||
$service = $this->getRecordService();
|
||||
$result = $service->initiateEviction($id);
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user