| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | public function post(string $id): Response |
||
| 48 | { |
||
| 49 | $node = $this->fs->getNode($id); |
||
| 50 | $session = $this->manager->create($node, $this->fs->getUser()); |
||
| 51 | |||
| 52 | return (new Response())->setCode(201)->setBody([ |
||
| 53 | 'node' => (string) $node->getId(), |
||
| 54 | 'access_token' => $session->getAccessToken(), |
||
| 55 | 'ttl' => $session->getAccessTokenTTL(), |
||
| 56 | ]); |
||
| 57 | } |
||
| 58 | } |
||
| 59 |