Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @PostMapping
- public ResponseEntity<UserView> getUserByEmailAndPassword(@RequestBody User user) {
- User findUser = userService.getUserByEmailAndPasswordDatabase(user.getEmail(), user.getPassword());
- UserView view = UserView.fromEntity(findUser);
- return new ResponseEntity<UserView>(view, HttpStatus.OK);
- }
- public User getUserByEmailAndPasswordDatabase(String email, String password) {
- return userMapper.getUserByEmailAndPassword(email, password);
- }
- @Select("SELECT * FROM users WHERE email=#{email} AND password=#{password}")
- User getUserByEmailAndPassword(@Param("email") String email, @Param("password") String password);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement