getBody(), true) ?? []; try { v::key('company_id', v::intType()->positive())->assert($body); } catch (ValidationException $e) { return ResponseLib::sendFail("Validation failed: " . $e->getFullMessage(), [], "E_VALIDATE")->withStatus(400); } $companyId = (int) $body['company_id']; $model = new DescriptionModel(); $data = $model->getDescriptionsByCompany($companyId); return ResponseLib::sendOk($data); } }