package app.usluga;

import app.model.Korisnik;
import app.model.Oglas;
import app.model.Uloga;
import app.rep.DodajRep;
import app.rep.KorisnickiRep;
import app.usluga.web.transfer.Registracija;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.Collection;
import java.util.stream.Collectors;

@Service
public class ImplementacijaDodaj implements DodajUsluga{

	private DodajRep kr;



	public ImplementacijaDodaj(DodajRep kr) {
		super();
		this.kr=kr;
	}



	@Override
	public Oglas save(Oglas r) {

			return kr.save(r);
	}

	@Override
	public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
		return null;
	}
}
