Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function handle($request, Closure $next) |
||
29 | { |
||
30 | $response = $next($request); |
||
31 | $content = json_decode($response->content(), true); |
||
32 | |||
33 | //if this is an oauth request then append API dedicated tenant URL |
||
34 | if (!empty($content['access_token'])) { |
||
35 | $content['api_url'] = url($this->tenantManager->getTenant()->subdomain); |
||
36 | $response->setContent($content); |
||
37 | } |
||
38 | |||
39 | return $response; |
||
40 | } |
||
42 |