Browse Source

Adding a few methods to userRepo

JaseG256 6 years ago
parent
commit
cec5ef165d

+ 6
- 0
ZipTeamOrange-server/src/main/java/ZipTeamOrange/Controller/UserController.java View File

@@ -29,4 +29,10 @@ public class UserController {
29 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
 }