improved tenant identification
This commit is contained in:
@ -69,7 +69,7 @@ class Companies extends ApiController
|
||||
public function update(Company $company, Request $request)
|
||||
{
|
||||
try {
|
||||
$company = $this->dispatch(new UpdateCompany($company, $request, session('company_id')));
|
||||
$company = $this->dispatch(new UpdateCompany($company, $request));
|
||||
|
||||
return $this->item($company->fresh(), new Transformer());
|
||||
} catch (\Exception $e) {
|
||||
@ -86,7 +86,7 @@ class Companies extends ApiController
|
||||
public function enable(Company $company)
|
||||
{
|
||||
try {
|
||||
$company = $this->dispatch(new UpdateCompany($company, request()->merge(['enabled' => 1]), session('company_id')));
|
||||
$company = $this->dispatch(new UpdateCompany($company, request()->merge(['enabled' => 1])));
|
||||
|
||||
return $this->item($company->fresh(), new Transformer());
|
||||
} catch (\Exception $e) {
|
||||
@ -103,7 +103,7 @@ class Companies extends ApiController
|
||||
public function disable(Company $company)
|
||||
{
|
||||
try {
|
||||
$company = $this->dispatch(new UpdateCompany($company, request()->merge(['enabled' => 0]), session('company_id')));
|
||||
$company = $this->dispatch(new UpdateCompany($company, request()->merge(['enabled' => 0])));
|
||||
|
||||
return $this->item($company->fresh(), new Transformer());
|
||||
} catch (\Exception $e) {
|
||||
@ -120,7 +120,7 @@ class Companies extends ApiController
|
||||
public function destroy(Company $company)
|
||||
{
|
||||
try {
|
||||
$this->dispatch(new DeleteCompany($company, session('company_id')));
|
||||
$this->dispatch(new DeleteCompany($company));
|
||||
|
||||
return $this->response->noContent();
|
||||
} catch (\Exception $e) {
|
||||
|
Reference in New Issue
Block a user