Company Gateway endpoint and tests

This commit is contained in:
David Bomba 2019-10-03 21:18:12 +10:00
parent 16cd98980b
commit 3af84f7de7
5 changed files with 4 additions and 7 deletions

View File

@ -131,10 +131,7 @@ class CompanyGatewayController extends BaseController
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function update(UpdateCompanyGatewayRequest $request, CompanyGateway $company_gateway) public function update(UpdateCompanyGatewayRequest $request, CompanyGateway $company_gateway)
//public function update(CompanyGateway $company_gateway)
{ {
\Log::error('wooppee');
\Log::error(print_r($company_gateway,1));
$company_gateway->fill($request->all()); $company_gateway->fill($request->all());
$company_gateway->save(); $company_gateway->save();

View File

@ -24,7 +24,7 @@ class DestroyCompanyGatewayRequest extends Request
public function authorize() public function authorize()
{ {
return auth()->user()->can('edit', $this->company_gateway); return auth()->user()->isAdmin();
} }
public function rules() public function rules()

View File

@ -24,7 +24,7 @@ class EditCompanyGatewayRequest extends Request
public function authorize() public function authorize()
{ {
return auth()->user()->can('edit', $this->company_gateway); return auth()->user()->isAdmin();
} }
public function rules() public function rules()

View File

@ -24,7 +24,7 @@ class ShowCompanyGatewayRequest extends Request
public function authorize() public function authorize()
{ {
return auth()->user()->can('view', $this->company_gateway); return auth()->user()->isAdmin();
} }
public function rules() public function rules()

View File

@ -24,7 +24,7 @@ class UpdateCompanyGatewayRequest extends Request
public function authorize() public function authorize()
{ {
return auth()->user()->can('edit', $this->company_gateway); return auth()->user()->isAdmin();
} }
public function rules() public function rules()