Ignore:
Timestamp:
01/16/22 16:46:28 (3 years ago)
Author:
Petar Partaloski <ppartaloski@…>
Branches:
main
Children:
7fafead
Parents:
2a5d6a3
Message:

Fixed password encoding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/wediscussmovies/project/service/impl/UserServiceImpl.java

    r2a5d6a3 r7bc8942  
    11package com.wediscussmovies.project.service.impl;
    22
     3import com.wediscussmovies.project.model.PasswordEncoder;
    34import com.wediscussmovies.project.model.User;
    45import com.wediscussmovies.project.model.exception.PasswordsDontMatchException;
     
    1112
    1213import javax.servlet.http.HttpServletRequest;
     14import java.security.NoSuchAlgorithmException;
    1315import java.util.Optional;
    1416
     
    4244            return Optional.empty();
    4345        }
    44             if(userRepository.findByUsername(username).isPresent()){
     46        if(userRepository.findByUsername(username).isPresent()){
    4547            request.getSession().setAttribute("error", new UserWithUsernameAlreadyExists(username).getMessage());
    4648            return Optional.empty();
Note: See TracChangeset for help on using the changeset viewer.