BAEL - 1916
Code refactored
@@ -18,10 +18,7 @@ public class UserController {
@RequestMapping("/login")
public boolean login(@RequestBody User user) {
- if(user.getUserName().equals("user") && user.getPassword().equals("password")) {
- return true;
- }
- return false;
+ return user.getUserName().equals("user") && user.getPassword().equals("password");
}
@RequestMapping("/user")
