src/AppBundle/Controller/Api/UserController.php 1 location
                
                
                    
                                                
                                                    
                                |  | @@ 20-29 (lines=10) @@ | 
                                                            
                                    | 17 |  |      * @Method("GET") | 
                                                            
                                    | 18 |  |      * @return JsonResponse | 
                                                            
                                    | 19 |  |      */ | 
                                                            
                                    | 20 |  |     public function listAction() | 
                                                            
                                    | 21 |  |     { | 
                                                            
                                    | 22 |  |         $users = $this->getDoctrine() | 
                                                            
                                    | 23 |  |             ->getRepository('AppBundle:User') | 
                                                            
                                    | 24 |  |             ->findAll(); | 
                                                            
                                    | 25 |  |         if (!$users) { | 
                                                            
                                    | 26 |  |             throw new JsonHttpException(404, 'User not found.'); | 
                                                            
                                    | 27 |  |         } | 
                                                            
                                    | 28 |  |         return $this->json(['users' => $users], 200, [], [AbstractNormalizer::GROUPS => ['Short']]); | 
                                                            
                                    | 29 |  |     } | 
                                                            
                                    | 30 |  | } | 
                                                            
                                    | 31 |  |  | 
                                                                        
                 
                                                            
                    
src/AppBundle/Controller/UserController.php 1 location
                
                
                    
                                                
                                                    
                                |  | @@ 164-173 (lines=10) @@ | 
                                                            
                                    | 161 |  |      * @Method("GET") | 
                                                            
                                    | 162 |  |      * @return JsonResponse | 
                                                            
                                    | 163 |  |      */ | 
                                                            
                                    | 164 |  |     public function jsonListAction() | 
                                                            
                                    | 165 |  |     { | 
                                                            
                                    | 166 |  |         $users = $this->getDoctrine() | 
                                                            
                                    | 167 |  |             ->getRepository('AppBundle:User') | 
                                                            
                                    | 168 |  |             ->selectNotBlocked(); | 
                                                            
                                    | 169 |  |         if (!$users) { | 
                                                            
                                    | 170 |  |             throw new JsonHttpException(404, 'User not found.'); | 
                                                            
                                    | 171 |  |         } | 
                                                            
                                    | 172 |  |         return $this->json(['users' => $users], 200, [], [AbstractNormalizer::GROUPS => ['Default']]); | 
                                                            
                                    | 173 |  |     } | 
                                                            
                                    | 174 |  | } | 
                                                            
                                    | 175 |  |  |