Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function __invoke(Request $request, Response $response, array $args): Response |
||
13 | { |
||
14 | $input = $request->getParsedBody(); |
||
15 | $userId = (int) $input['decoded']->sub; |
||
16 | $query = ''; |
||
17 | if (isset($args['query'])) { |
||
18 | $query = $args['query']; |
||
19 | } |
||
20 | $status = $request->getParam('status', null); |
||
21 | $tasks = $this->getTaskService()->search($query, $userId, $status); |
||
22 | |||
23 | return $this->jsonResponse($response, 'success', $tasks, 200); |
||
24 | } |
||
25 | } |
||
26 |