mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
add the current location of the user as API point + add it in the activity location list
This commit is contained in:
@@ -37,4 +37,25 @@ class UserApiController extends ApiController
|
||||
['groups' => ['read']]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "/api/1.0/main/user-current-location.{_format}",
|
||||
* name="chill_main_user_current_location",
|
||||
* requirements={
|
||||
* "_format": "json"
|
||||
* }
|
||||
* )
|
||||
*
|
||||
* @param mixed $_format
|
||||
*/
|
||||
public function currentLocation($_format): JsonResponse
|
||||
{
|
||||
return $this->json(
|
||||
$this->getUser()->getCurrentLocation(),
|
||||
JsonResponse::HTTP_OK,
|
||||
[],
|
||||
['groups' => ['read']]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user