Fix bug with missing entity manager for rider api calls #132

This commit is contained in:
Kendrick Chan 2018-05-28 20:16:26 +08:00
parent 70af6935ef
commit 2be0abb716

View file

@ -445,6 +445,7 @@ class RAPIController extends Controller
public function acceptJobOrder(Request $req)
{
$em = $this->getDoctrine()->getManager();
$required_params = ['jo_id'];
$res = $this->checkJO($req, $required_params, $jo);
if ($res->isError())
@ -465,6 +466,7 @@ class RAPIController extends Controller
public function cancelJobOrder(Request $req)
{
$em = $this->getDoctrine()->getManager();
$required_params = ['jo_id'];
$res = $this->checkJO($req, $required_params, $jo);
if ($res->isError())
@ -485,6 +487,7 @@ class RAPIController extends Controller
public function arrive(Request $req)
{
$em = $this->getDoctrine()->getManager();
$required_params = ['jo_id'];
$res = $this->checkJO($req, $required_params, $jo);
if ($res->isError())