| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function receiveUpdateAction(Request $request, $token) |
||
| 16 | { |
||
| 17 | if ($token !== $savedToken = $this->getParameter('telegram_token')) { |
||
| 18 | throw $this->createNotFoundException(); |
||
| 19 | } |
||
| 20 | |||
| 21 | $content = json_decode($request->getContent(), true); |
||
| 22 | |||
| 23 | $update = new Update( |
||
| 24 | $content, |
||
| 25 | $this->get('logger') |
||
| 26 | ); |
||
| 27 | |||
| 28 | $this->get('point_tools.telegram.update_processor')->process($update); |
||
| 29 | |||
| 30 | return new JsonResponse('received'); |
||
| 31 | } |
||
| 32 | } |
||
| 33 |