You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@RequestMapping(value = "/jobzilla/user/login", method = RequestMethod.POST)
public ResponseEntity login(@Valid @RequestBody User user) {
return userService.login(user);
}
following is the response part
public ResponseEntity login(@Valid User user) {
ResponseModel response = new ResponseModel();
User userlogin = userRepository.findByEmail(user.getEmail());
System.out.println("email");
if (user.getPassword().equals(userlogin.getPassword())) {
response.setResponseCode(HttpStatus.OK.toString());
response.setResponseDescription("Login Success");
response.setResponseObject(userlogin);
return new ResponseEntity(response, HttpStatus.OK);
}
return new ResponseEntity(response, HttpStatus.NO_CONTENT);
}
The text was updated successfully, but these errors were encountered:
@RequestMapping(value = "/jobzilla/user/login", method = RequestMethod.POST)
public ResponseEntity login(@Valid @RequestBody User user) {
return userService.login(user);
}
following is the response part
public ResponseEntity login(@Valid User user) {
ResponseModel response = new ResponseModel();
User userlogin = userRepository.findByEmail(user.getEmail());
System.out.println("email");
if (user.getPassword().equals(userlogin.getPassword())) {
response.setResponseCode(HttpStatus.OK.toString());
response.setResponseDescription("Login Success");
response.setResponseObject(userlogin);
return new ResponseEntity(response, HttpStatus.OK);
}
return new ResponseEntity(response, HttpStatus.NO_CONTENT);
}
The text was updated successfully, but these errors were encountered: