Allow rating of -1 for cancel rating for rider rating user api call #162
This commit is contained in:
parent
f8f9bb9b7b
commit
2aa765d186
1 changed files with 14 additions and 1 deletions
|
|
@ -1332,7 +1332,20 @@ class APIController extends Controller
|
||||||
// TODO: check job order status, if it's complete
|
// TODO: check job order status, if it's complete
|
||||||
|
|
||||||
// add rider rating
|
// add rider rating
|
||||||
$rating_num = $req->request->get('rating');
|
$rating_num = $req->request->get('rating', -1);
|
||||||
|
|
||||||
|
// if rating is -1
|
||||||
|
if ($rating_num == -1)
|
||||||
|
{
|
||||||
|
$jo->setHasRiderRating();
|
||||||
|
$em->flush();
|
||||||
|
|
||||||
|
$res->setData([]);
|
||||||
|
|
||||||
|
return $res->getReturnResponse();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$rating = new RiderRating();
|
$rating = new RiderRating();
|
||||||
$rating->setRider($rider)
|
$rating->setRider($rider)
|
||||||
->setCustomer($cust)
|
->setCustomer($cust)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue