| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | public function init(Service $service) |
||
| 27 | { |
||
| 28 | $service->get( |
||
| 29 | '/info', |
||
| 30 | function (Request $request, TokenInfo $tokenInfo) { |
||
| 31 | self::requireScope($tokenInfo, 'info_get'); |
||
| 32 | |||
| 33 | $response = new JsonResponse(); |
||
| 34 | $response->setBody( |
||
| 35 | [ |
||
| 36 | 'ip' => [ |
||
| 37 | 'v4' => $this->v4, |
||
| 38 | 'v6' => $this->v6, |
||
| 39 | ], |
||
| 40 | ] |
||
| 41 | ); |
||
| 42 | |||
| 43 | return $response; |
||
| 44 | } |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | |||
| 55 |