package app.usluga;

import app.model.Oglas;
import app.rep.OglasRep;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OglasUsluga
{
    @Autowired
    private OglasRep oglasRep;

    public List<Oglas> getAll()
    {
        return (List<Oglas>) oglasRep.findAll();
    }

	public void izbrisiOglas(int id) {
		this.oglasRep.deleteById(id);
	}

}
