mirror of
https://github.com/Karaka-Management/oms-FleetManagement.git
synced 2026-02-16 21:38:40 +00:00
more code fixes
This commit is contained in:
parent
9a49bc34f1
commit
6aee640852
|
|
@ -71,7 +71,7 @@ final class ApiDriverAttributeController extends Controller
|
||||||
->with('type')
|
->with('type')
|
||||||
->where('type/id', $type->id)
|
->where('type/id', $type->id)
|
||||||
->where('ref', (int) $request->getData('ref'))
|
->where('ref', (int) $request->getData('ref'))
|
||||||
->execute();
|
->executeCount();
|
||||||
|
|
||||||
if ($attr > 0) {
|
if ($attr > 0) {
|
||||||
$response->header->status = RequestStatusCode::R_409;
|
$response->header->status = RequestStatusCode::R_409;
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ final class ApiVehicleAttributeController extends Controller
|
||||||
->with('type')
|
->with('type')
|
||||||
->where('type/id', $type->id)
|
->where('type/id', $type->id)
|
||||||
->where('ref', (int) $request->getData('ref'))
|
->where('ref', (int) $request->getData('ref'))
|
||||||
->execute();
|
->executeCount();
|
||||||
|
|
||||||
if ($attr > 0) {
|
if ($attr > 0) {
|
||||||
$response->header->status = RequestStatusCode::R_409;
|
$response->header->status = RequestStatusCode::R_409;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ trait ApiControllerVehicleTrait
|
||||||
{
|
{
|
||||||
$vehicleType = VehicleTypeMapper::getAll()->execute();
|
$vehicleType = VehicleTypeMapper::getAll()->execute();
|
||||||
$vehicleTypeCount = \count($vehicleType);
|
$vehicleTypeCount = \count($vehicleType);
|
||||||
$fuelTypeCount = FuelTypeMapper::count()->execute();
|
$fuelTypeCount = FuelTypeMapper::count()->executeCount();
|
||||||
|
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest();
|
$request = new HttpRequest();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user