Resolve "Location support dummy API" #953
2 changed files with 27 additions and 0 deletions
|
|
@ -114,3 +114,8 @@ api_resend_code:
|
||||||
path: /api/resend_code
|
path: /api/resend_code
|
||||||
controller: App\Controller\APIController:resendCode
|
controller: App\Controller\APIController:resendCode
|
||||||
methods: [POST]
|
methods: [POST]
|
||||||
|
|
||||||
|
api_location_support:
|
||||||
|
path: /api/location_support
|
||||||
|
controller: App\Controller\APIController:locationSupport
|
||||||
|
methods: [GET]
|
||||||
|
|
|
||||||
|
|
@ -1477,4 +1477,26 @@ class APIController extends Controller
|
||||||
|
|
||||||
return $res->getReturnResponse();
|
return $res->getReturnResponse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function locationSupport(Request $req)
|
||||||
|
{
|
||||||
|
$required_params = [
|
||||||
|
'longitude',
|
||||||
|
'latitude',
|
||||||
|
];
|
||||||
|
$em = $this->getDoctrine()->getManager();
|
||||||
|
$res = $this->checkParamsAndKey($req, $em, $required_params);
|
||||||
|
if ($res->isError())
|
||||||
|
return $res->getReturnResponse();
|
||||||
|
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'longitude' => $req->query->get('longitude'),
|
||||||
|
'latitude' => $req->query->get('latitude'),
|
||||||
|
'supported' => true,
|
||||||
|
];
|
||||||
|
$res->setData($data);
|
||||||
|
|
||||||
|
return $res->getReturnResponse();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue