package fr.eni.enchere.bll;

import fr.eni.enchere.bo.ForgotPassword;
import fr.eni.enchere.dal.ForgotPasswordRepository;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("ForgotPasswordService")
public class ForgotPasswordServiceImpl implements ForgotPasswordService {

    private ForgotPasswordRepository forgotPasswordRepository;

    public ForgotPasswordServiceImpl(ForgotPasswordRepository forgotPasswordRepository) {
        this.forgotPasswordRepository = forgotPasswordRepository;
    }

    @Override
    public ForgotPassword getForgotPassword(String link) {
        return forgotPasswordRepository.getForgotPasswordByLink(link);
    }

    @Override
    public void setForgotPassword(String email) {
        forgotPasswordRepository.setForgotPasswords(email);
    }
}
