public UserDto logIn(String email, String psw) { User user = userRepo.findByEmailAndPassword(email, psw); if (user == null) { return null; } return new UserDto(user); }
public UserDto singIn(String email, String psw) { if (logIn(email, psw) == null) { return new UserDto(userRepo.save(new User(email, psw))); } return null; }