Przeglądaj źródła

Adding a few methods to userRepo

JaseG256 6 lat temu
rodzic
commit
cec5ef165d

+ 6
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Controller/UserController.java Wyświetl plik

29
         return userRepository.findAll();
29
         return userRepository.findAll();
30
     }
30
     }
31
 
31
 
32
+    @GetMapping(path="/all")
33
+    public @ResponseBody Iterable<User> getAllUser(){
34
+        //this returns a JSON or XML with users
35
+        return userRepository.findAll();
36
+    }
37
+
32
 }
38
 }