Changeset e097c1c for src/main/java/com/example/moviezone/service
- Timestamp:
- 02/04/23 19:28:58 (23 months ago)
- Branches:
- master
- Children:
- a554435
- Parents:
- 6032d44
- Location:
- src/main/java/com/example/moviezone/service
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/moviezone/service/Impl/UserServiceImpl.java
r6032d44 re097c1c 4 4 import com.example.moviezone.model.User; 5 5 import com.example.moviezone.model.Worker; 6 import com.example.moviezone.model.exceptions.PasswordsDoNotMatchException; 6 7 import com.example.moviezone.model.exceptions.UserNotFoundException; 7 8 import com.example.moviezone.repository.UserRepository; … … 39 40 40 41 @Override 41 public User register(String first_name, String last_name, String username, String email, String number, String password, String role) { 42 public User register(String first_name, String last_name, String username, String email, String number, String password,String repeatedPassword, String role) { 43 if(!password.equals(repeatedPassword)) 44 throw new PasswordsDoNotMatchException(); 45 else 42 46 if(role.equals("worker")) 43 47 { -
src/main/java/com/example/moviezone/service/UserService.java
r6032d44 re097c1c 10 10 User findByUsername(String username); 11 11 12 User register(String first_name, String last_name,String username, String email, String number, String password, String role);12 User register(String first_name, String last_name,String username, String email, String number, String password,String repeatedPassword, String role); 13 13 User login(String username,String password); 14 14 }
Note:
See TracChangeset
for help on using the changeset viewer.