Index: src/main/java/com/example/cookbook/controller/HomeController.java
===================================================================
--- src/main/java/com/example/cookbook/controller/HomeController.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/controller/HomeController.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,108 +1,2 @@
-package com.example.cookbook.controller;
-
-
-import com.example.cookbook.model.*;
-import com.example.cookbook.model.exception.ReceptNeEPronajdenException;
-import com.example.cookbook.service.*;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.sql.SQLException;
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Controller
-public class HomeController {
-
-    private final ReceptService receptService;
-    private final SlikiService slikiService;
-
-    private final SostojkiService sostojkiService;
-
-    private final KomentariService komentariService;
-
-    private final KorisniciService korisniciService;
-
-    public HomeController(ReceptService receptService,
-                          SlikiService slikiService,
-                          SostojkiService sostojkiService, KomentariService komentariService, KorisniciService korisniciService) {
-
-        this.receptService = receptService;
-        this.slikiService = slikiService;
-        this.sostojkiService = sostojkiService;
-        this.komentariService = komentariService;
-        this.korisniciService = korisniciService;
-    }
-
-    @GetMapping({"/", "/recepti"})
-    public String getHomePage(Model model){
-
-        List<Recept> recepti = null;
-        try {
-            recepti = receptService.listAll();
-        } catch (SQLException e) {
-            return "redirect:/error-page/SQL%20Exception";
-        }
-        model.addAttribute("recepti", recepti);
-        return "home";
-    }
-
-    @GetMapping("/recept/{id}")
-    public String getReceptPage(@PathVariable Long id, Model model){
-
-        Recept recept = null;
-        List<Slika> sliki;
-        List<Sostojka> sostojki;
-        List<Komentar> komentari;
-        List<Korisnik> posetiteli;
-        try {
-            recept = receptService.findById(id);
-            sliki = slikiService.findAllPicById(id);
-            sostojki = sostojkiService.findAllById(id);
-            komentari = komentariService.findAllById(id);
-            posetiteli = korisniciService.findAllByRole(TipKorisnik.Posetitel);
-        } catch (SQLException e) {
-            return "redirect:/error-page/SQL%20Exception";
-        }catch (ReceptNeEPronajdenException e){
-            return "redirect:/error-page/" + e.getMessage();
-        }
-        model.addAttribute("recept", recept);
-        model.addAttribute("sliki", sliki);
-        model.addAttribute("sostojki", sostojki);
-        model.addAttribute("komentari", komentari);
-        model.addAttribute("posetiteli", posetiteli);
-        return "recept";
-    }
-
-    @PostMapping("/komentar/{id}")
-    public String processKomentar(@PathVariable Long id,
-                                  @RequestParam Integer ocena,
-                                  @RequestParam String komentar,
-                                  @RequestParam String telefon){
-        if (id == null){
-            return "redirect:/error-page/Ne%20dodavanje%20komentar(Identifikatorot%20na%20receptot%20ne%20postoi)";
-        }
-        try {
-            komentariService.add(telefon, id, ocena, komentar);
-        } catch (SQLException e) {
-            return "redirect:/error-page/SQL%20Exception";
-        }catch (IllegalArgumentException e){
-            return "redirect:/error-page/Illegal%20Arguments";
-        }
-        return "redirect:/recept/" + id;
-    }
-
-
-    @GetMapping("/error-page/{error}")
-    public String getErrorPage(@PathVariable(required = false) String error, Model model){
-
-        if (error != null){
-            model.addAttribute("error", error);
-        }
-        return "error-page";
-    }
+package com.example.cookbook.controller;public class HomeController {
 }
Index: src/main/java/com/example/cookbook/controller/VrabotenController.java
===================================================================
--- src/main/java/com/example/cookbook/controller/VrabotenController.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,60 +1,0 @@
-package com.example.cookbook.controller;
-
-
-import com.example.cookbook.model.DostavaDTO;
-import com.example.cookbook.model.Naracka;
-import com.example.cookbook.model.Recept;
-import com.example.cookbook.model.Stavka;
-import com.example.cookbook.service.NarackiService;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.sql.SQLException;
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Controller
-public class VrabotenController {
-
-    private final NarackiService narcakiService;
-
-    public VrabotenController(NarackiService narcakiService) {
-        this.narcakiService = narcakiService;
-    }
-
-
-    @GetMapping("/naracki")
-    public String getNaracki(Model model){
-
-        List<Naracka> naracki = null;
-        try {
-            naracki = narcakiService.listAll();
-        } catch (SQLException e) {
-            return "redirect:/error-page/SQL%20Exception";
-        }
-        model.addAttribute("naracki", naracki);
-        return "naracki";
-    }
-
-    @GetMapping("/naracki/naracka")
-    public String getNarackaPage(@RequestParam String telefon,
-                                 @RequestParam LocalDateTime vreme,
-                                 Model model){
-        List<DostavaDTO> podatoci = null;
-        List<Stavka> stavkiVoNaracka = null;
-        try {
-            stavkiVoNaracka = narcakiService.findByTelAndVreme(telefon, vreme);
-            podatoci = narcakiService.findDataForDostava(telefon, vreme);
-        } catch (SQLException e) {
-            return "redirect:/error-page/SQL%20Exception";
-        }
-
-        model.addAttribute("stavki", stavkiVoNaracka);
-        model.addAttribute("podatoci", podatoci);
-
-        return "stavka";
-    }
-}
Index: src/main/java/com/example/cookbook/dbConfig/DB.java
===================================================================
--- src/main/java/com/example/cookbook/dbConfig/DB.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/dbConfig/DB.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,56 +1,2 @@
-package com.example.cookbook.dbConfig;
-
-
-import org.springframework.stereotype.Component;
-
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-
-@Component
-public class DB {
-//    private static final String SSH_HOST = "194.149.135.130";
-//    private static final String SSH_USER = "t_cbdb";
-//    private static final String SSH_PASSWORD = "b6cd27a3";
-
-
-    //Remote database parameters
-    private static final String DB_URL = "jdbc:postgresql://localhost:9999/db_202324z_va_prj_cbdb";
-    private static final String DB_USERNAME = "db_202324z_va_prj_cbdb_owner";
-    private static final String DB_PASSWORD = "d922daf2bfec";
-
-
-    //Local database parameters
-    private static final String LDB_URL = "jdbc:postgresql://localhost:5432/cbdb";
-    private static final String LDB_USERNAME = "postgres";
-    private static final String LDB_PASSWORD = "04UF@bak";
-
-    private static Connection connection = null;
-
-
-
-
-
-
-    private static void setConnection() throws SQLException {
-
-        if (connection == null || connection.isClosed()){
-            connection = DriverManager.getConnection(LDB_URL, LDB_USERNAME, LDB_PASSWORD);
-            connection.createStatement().execute("set search_path to project");
-        }
-    }
-
-    public static Connection getConnection() throws SQLException {
-        setConnection();
-        return connection;
-    }
-
-
-    public static void closeConnection() throws SQLException {
-        if (connection != null){
-            connection.close();
-        }
-    }
+package com.example.cookbook.dbConfig;public class DB {
 }
-
Index: src/main/java/com/example/cookbook/model/DostavaDTO.java
===================================================================
--- src/main/java/com/example/cookbook/model/DostavaDTO.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/model/DostavaDTO.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,11 +1,2 @@
-package com.example.cookbook.model;
-
-import java.time.LocalDateTime;
-
-public record DostavaDTO (String recIme, String adresa, String sostojka){
-    public DostavaDTO(String recIme, String adresa, String sostojka) {
-        this.recIme = recIme;
-        this.adresa = adresa;
-        this.sostojka = sostojka;
-    }
+package com.example.cookbook.model;public class Dostava {
 }
Index: src/main/java/com/example/cookbook/model/Komentar.java
===================================================================
--- src/main/java/com/example/cookbook/model/Komentar.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,91 +1,0 @@
-package com.example.cookbook.model;
-
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-
-public class Komentar {
-
-    private LocalDateTime komData;
-
-    private String telefon;
-
-    private Long recId;
-
-    private Integer ocena;
-
-    private String text;
-
-    private String imePrezime;
-
-    public String getImePrezime() {
-        return imePrezime;
-    }
-
-    public void setImePrezime(String imePrezime) {
-        this.imePrezime = imePrezime;
-    }
-
-    public Komentar(LocalDateTime komData, String telefon, Long recId, Integer ocena, String text) {
-        this.komData = komData;
-        this.telefon = telefon;
-        this.recId = recId;
-        this.ocena = ocena;
-        this.text = text;
-    }
-
-    public Komentar(LocalDateTime komData, String telefon, Long recId, Integer ocena, String text, String imePrezime) {
-        this.komData = komData;
-        this.telefon = telefon;
-        this.recId = recId;
-        this.ocena = ocena;
-        this.text = text;
-        this.imePrezime = imePrezime;
-    }
-
-    public Komentar() {
-    }
-
-    public LocalDateTime getKomData() {
-        return komData;
-    }
-
-    public void setKomData(LocalDateTime komData) {
-        this.komData = komData;
-    }
-
-    public String getTelefon() {
-        return telefon;
-    }
-
-    public void setTelefon(String telefon) {
-        this.telefon = telefon;
-    }
-
-    public Long getRecId() {
-        return recId;
-    }
-
-    public void setRecId(Long recId) {
-        this.recId = recId;
-    }
-
-    public Integer getOcena() {
-        return ocena;
-    }
-
-    public void setOcena(Integer ocena) {
-        this.ocena = ocena;
-    }
-
-    public String getText() {
-        return text;
-    }
-
-    public void setText(String text) {
-        this.text = text;
-    }
-
-    public String getDataFormatirana(){
-        return komData.format(DateTimeFormatter.ofPattern("yyyy-MMM-dd HH:mm"));
-    }
-}
Index: src/main/java/com/example/cookbook/model/Korisnik.java
===================================================================
--- src/main/java/com/example/cookbook/model/Korisnik.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,54 +1,0 @@
-package com.example.cookbook.model;
-
-public class Korisnik {
-
-    private String telefon;
-
-    private String ime;
-
-    private String prezime;
-
-    private TipKorisnik tipKorisnik;
-
-    public Korisnik(String telefon, String ime, String prezime, TipKorisnik tipKorisnik) {
-        this.telefon = telefon;
-        this.ime = ime;
-        this.prezime = prezime;
-        this.tipKorisnik = tipKorisnik;
-    }
-
-    public Korisnik() {
-    }
-
-    public String getTelefon() {
-        return telefon;
-    }
-
-    public void setTelefon(String telefon) {
-        this.telefon = telefon;
-    }
-
-    public String getIme() {
-        return ime;
-    }
-
-    public void setIme(String ime) {
-        this.ime = ime;
-    }
-
-    public String getPrezime() {
-        return prezime;
-    }
-
-    public void setPrezime(String prezime) {
-        this.prezime = prezime;
-    }
-
-    public TipKorisnik getTipKorisnik() {
-        return tipKorisnik;
-    }
-
-    public void setTipKorisnik(TipKorisnik tipKorisnik) {
-        this.tipKorisnik = tipKorisnik;
-    }
-}
Index: src/main/java/com/example/cookbook/model/Naracka.java
===================================================================
--- src/main/java/com/example/cookbook/model/Naracka.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,39 +1,0 @@
-package com.example.cookbook.model;
-
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-
-public class Naracka {
-
-    private LocalDateTime vreme;
-
-    private String telefon;
-
-    public Naracka() {
-    }
-
-    public LocalDateTime getVreme() {
-        return vreme;
-    }
-
-    public void setVreme(LocalDateTime vreme) {
-        this.vreme = vreme;
-    }
-
-    public String getTelefon() {
-        return telefon;
-    }
-
-    public void setTelefon(String telefon) {
-        this.telefon = telefon;
-    }
-
-    public Naracka(LocalDateTime vreme, String telefon) {
-        this.vreme = vreme;
-        this.telefon = telefon;
-    }
-    public String getDataFormatirana(){
-        return vreme.format(DateTimeFormatter.ofPattern("yyyy-MMM-dd HH:mm"));
-    }
-
-}
Index: src/main/java/com/example/cookbook/model/Recept.java
===================================================================
--- src/main/java/com/example/cookbook/model/Recept.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/model/Recept.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,9 +1,17 @@
 package com.example.cookbook.model;
 
-public class Recept {
+public class ReceptForList {
 
     private Long recId;
 
     private String recIme;
+
+    public String getPostapka() {
+        return postapka;
+    }
+
+    public void setPostapka(String postapka) {
+        this.postapka = postapka;
+    }
 
     private String postapka;
@@ -19,5 +27,5 @@
     }
 
-    public Recept(Long recId, String recIme, String postapka) {
+    public ReceptForList(Long recId, String recIme, String postapka) {
         this.recId = recId;
         this.recIme = recIme;
@@ -26,5 +34,5 @@
     }
 
-    public Recept() {
+    public ReceptForList() {
     }
 
@@ -45,10 +53,4 @@
     }
 
-    public String getPostapka() {
-        return postapka;
-    }
 
-    public void setPostapka(String postapka) {
-        this.postapka = postapka;
-    }
 }
Index: src/main/java/com/example/cookbook/model/Slika.java
===================================================================
--- src/main/java/com/example/cookbook/model/Slika.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/model/Slika.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,43 +1,2 @@
-package com.example.cookbook.model;
-
-public class Slika {
-
-    private Integer redenBroj;
-
-    private Long recId;
-
-    private String pic;
-
-    public Slika() {
-    }
-
-    public Slika(Integer redenBroj, Long recId, String pic) {
-        this.redenBroj = redenBroj;
-        this.recId = recId;
-        this.pic = pic;
-    }
-
-    public String getPic() {
-        return pic;
-    }
-
-    public void setPic(String pic) {
-        this.pic = pic;
-    }
-
-    public Integer getRedenBroj() {
-        return redenBroj;
-    }
-
-    public void setRedenBroj(Integer redenBroj) {
-        this.redenBroj = redenBroj;
-    }
-
-    public Long getRecId() {
-        return recId;
-    }
-
-    public void setRecId(Long recId) {
-        this.recId = recId;
-    }
+package com.example.cookbook.model;public class Slika {
 }
Index: src/main/java/com/example/cookbook/model/Sostojka.java
===================================================================
--- src/main/java/com/example/cookbook/model/Sostojka.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/model/Sostojka.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,32 +1,2 @@
-package com.example.cookbook.model;
-
-public class Sostojka {
-
-    private Long sId;
-
-    private String sNaziv;
-
-    public Sostojka(Long sId, String sNaziv) {
-        this.sId = sId;
-        this.sNaziv = sNaziv;
-    }
-
-    public Sostojka() {
-    }
-
-    public Long getsId() {
-        return sId;
-    }
-
-    public void setsId(Long sId) {
-        this.sId = sId;
-    }
-
-    public String getsNaziv() {
-        return sNaziv;
-    }
-
-    public void setsNaziv(String sNaziv) {
-        this.sNaziv = sNaziv;
-    }
+package com.example.cookbook.model;public class Sostojki {
 }
Index: src/main/java/com/example/cookbook/model/Stavka.java
===================================================================
--- src/main/java/com/example/cookbook/model/Stavka.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,58 +1,0 @@
-package com.example.cookbook.model;
-
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-
-public class Stavka {
-    private LocalDateTime vreme;
-    private String telefon;
-    private String recIme;
-    private String nacin;
-
-    public LocalDateTime getVreme() {
-        return vreme;
-    }
-
-    public void setVreme(LocalDateTime vreme) {
-        this.vreme = vreme;
-    }
-
-    public String getTelefon() {
-        return telefon;
-    }
-
-    public void setTelefon(String telefon) {
-        this.telefon = telefon;
-    }
-
-
-
-    public String getNacin() {
-        return nacin;
-    }
-
-    public void setNacin(String nacin) {
-        this.nacin = nacin;
-    }
-
-    public String getRecIme() {
-        return recIme;
-    }
-
-    public void setRecIme(String recIme) {
-        this.recIme = recIme;
-    }
-
-    public Stavka(LocalDateTime vreme, String telefon, String recIme, String nacin) {
-        this.vreme = vreme;
-        this.telefon = telefon;
-        this.recIme = recIme;
-        this.nacin = nacin;
-    }
-    public String getDataFormatirana(){
-        return vreme.format(DateTimeFormatter.ofPattern("yyyy-MMM-dd HH:mm"));
-    }
-
-    public Stavka() {
-    }
-}
Index: src/main/java/com/example/cookbook/model/TipKorisnik.java
===================================================================
--- src/main/java/com/example/cookbook/model/TipKorisnik.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,5 +1,0 @@
-package com.example.cookbook.model;
-
-public enum TipKorisnik {
-    Vraboten, Posetitel
-}
Index: src/main/java/com/example/cookbook/model/exception/ReceptNeEPronajdenException.java
===================================================================
--- src/main/java/com/example/cookbook/model/exception/ReceptNeEPronajdenException.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/model/exception/ReceptNeEPronajdenException.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,7 +1,2 @@
-package com.example.cookbook.model.exception;
-
-public class ReceptNeEPronajdenException extends RuntimeException{
-    public ReceptNeEPronajdenException() {
-        super("Receptot ne e pronajden");
-    }
+package com.example.cookbook.model.exception;public class ReceptNeEPronajdenException {
 }
Index: src/main/java/com/example/cookbook/repository/KomentariRepository.java
===================================================================
--- src/main/java/com/example/cookbook/repository/KomentariRepository.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,66 +1,0 @@
-package com.example.cookbook.repository;
-
-
-import com.example.cookbook.dbConfig.DB;
-import com.example.cookbook.model.Komentar;
-import org.springframework.stereotype.Repository;
-
-import java.sql.*;
-import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.List;
-
-@Repository
-public class KomentariRepository {
-
-    public List<Komentar> findAllByRecId(Long recId) throws SQLException {
-        Connection connection = DB.getConnection();
-
-        String query = "select k.kom_data, k.telefon, k.rec_id, k.ocena, k.text, korisnici.kor_ime, korisnici.prezime\n" +
-                "from komentari k\n" +
-                "    left join korisnici on k.telefon = korisnici.telefon\n" +
-                "where rec_id = ?;";
-
-        PreparedStatement prepStm = connection.prepareStatement(query);
-        prepStm.setLong(1, recId);
-
-        ResultSet result = prepStm.executeQuery();
-        List<Komentar> komentari = new ArrayList<>();
-
-        while (result.next()){
-            Komentar komentar = new Komentar();
-            komentar.setKomData(result.getObject("kom_data", LocalDateTime.class));
-            komentar.setTelefon(result.getString("telefon"));
-            komentar.setRecId(result.getLong("rec_id"));
-            komentar.setOcena(result.getInt("ocena"));
-            komentar.setText(result.getString("text"));
-            komentar.setImePrezime(result.getString("kor_ime") + " " + result.getString("prezime"));
-            komentari.add(komentar);
-        }
-
-        result.close();
-        prepStm.close();
-        DB.closeConnection();
-
-        return komentari;
-    }
-
-    public void save(Komentar komentar) throws SQLException {
-        Connection connection = DB.getConnection();
-
-        String query = "insert into komentari (kom_data, telefon, rec_id, ocena, text) values \n" +
-                "        (?, ?, ?, ?, ?);";
-
-        PreparedStatement prepStm = connection.prepareStatement(query);
-        prepStm.setObject(1, komentar.getKomData());
-        prepStm.setString(2, komentar.getTelefon());
-        prepStm.setLong(3, komentar.getRecId());
-        prepStm.setInt(4, komentar.getOcena());
-        prepStm.setString(5, komentar.getText());
-
-        prepStm.executeUpdate();
-
-        prepStm.close();
-        DB.closeConnection();
-    }
-}
Index: src/main/java/com/example/cookbook/repository/KorisniciRepository.java
===================================================================
--- src/main/java/com/example/cookbook/repository/KorisniciRepository.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,55 +1,0 @@
-package com.example.cookbook.repository;
-
-
-import com.example.cookbook.dbConfig.DB;
-import com.example.cookbook.model.Komentar;
-import com.example.cookbook.model.Korisnik;
-import com.example.cookbook.model.TipKorisnik;
-import org.springframework.stereotype.Repository;
-
-import java.sql.*;
-import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.List;
-
-@Repository
-public class KorisniciRepository {
-    public List<Korisnik> findAllByRole(TipKorisnik tipKorisnik) throws SQLException {
-        Connection connection = DB.getConnection();
-
-        String query;
-
-        if (tipKorisnik == TipKorisnik.Posetitel){
-            query = "select p.telefon, k.kor_ime, k.prezime\n" +
-                    "from posetiteli p\n" +
-                    "    left join korisnici k on p.telefon = k.telefon";
-        } else {
-            query = "select v.telefon, k.kor_ime, k.prezime\n" +
-                    "from vraboteni v\n" +
-                    "    left join korisnici k on v.telefon = k.telefon";
-        }
-
-        Statement stm = connection.createStatement();
-
-
-        ResultSet result = stm.executeQuery(query);
-        List<Korisnik> korisnici = new ArrayList<>();
-
-        while (result.next()){
-            Korisnik korisnik = new Korisnik();
-            korisnik.setTelefon(result.getString("telefon"));
-            korisnik.setIme(result.getString("kor_ime"));
-            korisnik.setPrezime(result.getString("prezime"));
-            korisnik.setTipKorisnik(tipKorisnik);
-            korisnici.add(korisnik);
-        }
-
-        result.close();
-        stm.close();
-        DB.closeConnection();
-
-        return korisnici;
-    }
-
-
-}
Index: src/main/java/com/example/cookbook/repository/NarackiRepository.java
===================================================================
--- src/main/java/com/example/cookbook/repository/NarackiRepository.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,124 +1,0 @@
-package com.example.cookbook.repository;
-
-
-import com.example.cookbook.dbConfig.DB;
-import com.example.cookbook.model.DostavaDTO;
-import com.example.cookbook.model.Naracka;
-import com.example.cookbook.model.Recept;
-import com.example.cookbook.model.Stavka;
-import org.springframework.stereotype.Repository;
-
-import java.sql.*;
-import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.List;
-
-@Repository
-public class NarackiRepository {
-
-
-    public List<Naracka> findAll() throws SQLException {
-
-        Connection connection = DB.getConnection();
-        Statement stm = connection.createStatement();
-        String query = "select vreme, telefon from naracki;";
-
-        ResultSet result = stm.executeQuery(query);
-        List<Naracka> naracki = new ArrayList<>();
-
-        while (result.next()){
-            Naracka naracka = new Naracka();
-            naracka.setVreme(result.getObject("vreme", LocalDateTime.class));
-            naracka.setTelefon(result.getString("telefon"));
-            naracki.add(naracka);
-        }
-
-        DB.closeConnection();
-        result.close();
-        stm.close();
-        return naracki;
-    }
-
-    public List<Stavka> findByTelAndVreme(String telefon, LocalDateTime vreme) throws SQLException {
-
-        Connection connection = DB.getConnection();
-        String query = "select sk.vreme, sk.telefon, r.rec_ime, nacin from so_koi sk\n" +
-                "        left join recepti r on r.rec_id = sk.rec_id\n" +
-                "where vreme = ? and telefon = ?;";
-        PreparedStatement prepStm = connection.prepareStatement(query);
-
-        prepStm.setObject(1, vreme);
-        prepStm.setString(2, telefon);
-
-        ResultSet result = prepStm.executeQuery();
-        List<Stavka> stavki = new ArrayList<>();
-        while (result.next()){
-            Stavka stavka = new Stavka();
-            stavka.setRecIme(result.getString("rec_ime"));
-            stavka.setTelefon(result.getString("telefon"));
-            stavka.setNacin(result.getString("nacin"));
-            stavka.setVreme(result.getObject("vreme", LocalDateTime.class));
-            stavki.add(stavka);
-        }
-        DB.closeConnection();
-        result.close();
-        prepStm.close();
-        return stavki;
-    }
-
-    public List<DostavaDTO> findDataForDostava(String telefon, LocalDateTime vreme) throws SQLException {
-        Connection connection = DB.getConnection();
-        String query = "select r.rec_ime, l.adresa, 'Готово' sostojka from so_koi sk\n" +
-                "            left join recepti r on\n" +
-                "                        r.rec_id = sk.rec_id\n" +
-                "                left join opsluzuva o on\n" +
-                "                        o.rec_id = r.rec_id\n" +
-                "                left join restorani r2 on\n" +
-                "                        r2.res_id = o.res_id\n" +
-                "                left join se_naogja1 sn on\n" +
-                "                        sn.res_id = r2.res_id\n" +
-                "                left join lokacii l on\n" +
-                "                        l.l_id = sn.l_id\n" +
-                "        where vreme = ? and telefon = ? and sk.nacin = 'Готово'\n" +
-                "union\n" +
-                "select r.rec_ime, l.adresa, s2.s_naziv sostojka  from so_koi sk\n" +
-                "        left join recepti r on\n" +
-                "                        r.rec_id = sk.rec_id\n" +
-                "                left join sodrzi s on\n" +
-                "                        r.rec_id = s.rec_id\n" +
-                "                left join sostojki s2 on\n" +
-                "                        s2.s_id = s.s_id\n" +
-                "                left join ja_ima ji on\n" +
-                "                        ji.s_id = s2.s_id\n" +
-                "                left join prodavnici p on\n" +
-                "                        p.pro_id = ji.pro_id\n" +
-                "                left join se_naogja2 sn on\n" +
-                "                        sn.pro_id = p.pro_id\n" +
-                "                left join lokacii l on\n" +
-                "                        l.l_id = sn.l_id\n" +
-                "        where vreme = ? and telefon = ? and sk.nacin = 'Состојки'";
-        PreparedStatement prepStm = connection.prepareStatement(query);
-
-        prepStm.setObject(1, vreme);
-        prepStm.setString(2, telefon);
-        prepStm.setObject(3, vreme);
-        prepStm.setString(4, telefon);
-
-        ResultSet result = prepStm.executeQuery();
-
-        List<DostavaDTO> dostavaDTOS = new ArrayList<>();
-        while (result.next()){
-            DostavaDTO stavka = new DostavaDTO(
-                    result.getString("rec_ime"),
-                    result.getString("adresa"),
-                    result.getString("sostojka")
-            );
-
-            dostavaDTOS.add(stavka);
-        }
-        DB.closeConnection();
-        result.close();
-        prepStm.close();
-        return dostavaDTOS;
-    }
-}
Index: src/main/java/com/example/cookbook/repository/ReceptRepository.java
===================================================================
--- src/main/java/com/example/cookbook/repository/ReceptRepository.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/repository/ReceptRepository.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,67 +1,2 @@
-package com.example.cookbook.repository;
-
-
-import com.example.cookbook.dbConfig.DB;
-import com.example.cookbook.model.Recept;
-import org.springframework.stereotype.Repository;
-
-import java.sql.*;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Optional;
-
-@Repository
-public class ReceptRepository {
-
-
-    public List<Recept> findAll() throws SQLException {
-        Connection connection = DB.getConnection();
-
-        Statement stm = connection.createStatement();
-        String query = "select r.rec_id, r.rec_ime , r.postapka,  avg(k.ocena) average\n" +
-                "from  recepti r\n" +
-                "    left join komentari k\n" +
-                "        on r.rec_id = k.rec_id\n" +
-                "group by r.rec_id, r.rec_ime";
-        ResultSet result = stm.executeQuery(query);
-
-        List<Recept> recepti = new ArrayList<>();
-        while (result.next()){
-            Recept recept = new Recept();
-
-            recept.setRecId(result.getLong("rec_id"));
-            recept.setRecIme(result.getString("rec_ime"));
-            recept.setPostapka(result.getString("postapka"));
-            recept.setSrednaOcena(result.getFloat("average"));
-
-            recepti.add(recept);
-
-        }
-        stm.close();
-        result.close();
-        DB.closeConnection();
-        return recepti;
-    }
-
-    public Optional<Recept> findById(Long recId) throws SQLException {
-        Connection connection = DB.getConnection();
-
-        String query = "select * from recepti r where r.rec_id = ?";
-        PreparedStatement prepStm = connection.prepareStatement(query);
-        prepStm.setLong(1, recId);
-
-        ResultSet result = prepStm.executeQuery();
-        Recept recept = null;
-        if(result.next()){
-            recept = new Recept();
-            recept.setRecId(result.getLong("rec_id"));
-            recept.setRecIme(result.getString("rec_ime"));
-            recept.setPostapka(result.getString("postapka"));
-        }
-        result.close();
-        prepStm.close();
-        DB.closeConnection();
-        return Optional.ofNullable(recept);
-        
-    }
+package com.example.cookbook.repository;public class ReceptRepository {
 }
Index: src/main/java/com/example/cookbook/repository/SlikiZaReceptRepository.java
===================================================================
--- src/main/java/com/example/cookbook/repository/SlikiZaReceptRepository.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/repository/SlikiZaReceptRepository.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,43 +1,2 @@
-package com.example.cookbook.repository;
-
-import com.example.cookbook.dbConfig.DB;
-import com.example.cookbook.model.Recept;
-import com.example.cookbook.model.Slika;
-import org.springframework.stereotype.Repository;
-
-import java.nio.charset.StandardCharsets;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-
-@Repository
-public class SlikiZaReceptRepository {
-
-    public List<Slika> findAllForRecipe(Long recId) throws SQLException {
-        Connection connection = DB.getConnection();
-
-        String query = "select * from sliki s where s.rec_id = ? order by s.reden_broj asc";
-        PreparedStatement prepStm = connection.prepareStatement(query);
-        prepStm.setLong(1, recId);
-
-        ResultSet result = prepStm.executeQuery();
-        List<Slika> sliki = new ArrayList<>();
-
-        while (result.next()){
-            Slika slika = new Slika();
-            slika.setRecId(result.getLong("rec_id"));
-            slika.setRedenBroj(result.getInt("reden_broj"));
-            slika.setPic(new String(result.getBytes("slika"), StandardCharsets.UTF_8));
-            sliki.add(slika);
-        }
-
-        result.close();
-        prepStm.close();
-        DB.closeConnection();
-
-        return sliki;
-    }
+package com.example.cookbook.repository;public class SlikiZaReceptRepository {
 }
Index: src/main/java/com/example/cookbook/repository/SostojkiRespository.java
===================================================================
--- src/main/java/com/example/cookbook/repository/SostojkiRespository.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/repository/SostojkiRespository.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,49 +1,2 @@
-package com.example.cookbook.repository;
-
-
-import com.example.cookbook.dbConfig.DB;
-import com.example.cookbook.model.Slika;
-import com.example.cookbook.model.Sostojka;
-import org.springframework.stereotype.Repository;
-
-import java.nio.charset.StandardCharsets;
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-
-@Repository
-public class SostojkiRespository {
-
-
-    public List<Sostojka> findAllByRId(Long rId) throws SQLException {
-        Connection connection = DB.getConnection();
-
-        String query = "select s.s_id, s_naziv\n" +
-                "from sodrzi\n" +
-                "    left join sostojki s on\n" +
-                "        sodrzi.s_id = s.s_id\n" +
-                "where rec_id = ?";
-
-        PreparedStatement prepStm = connection.prepareStatement(query);
-        prepStm.setLong(1, rId);
-
-        ResultSet result = prepStm.executeQuery();
-        List<Sostojka> sostojki = new ArrayList<>();
-
-        while (result.next()){
-            Sostojka sostojka = new Sostojka();
-            sostojka.setsId(result.getLong("s_id"));
-            sostojka.setsNaziv(result.getString("s_naziv"));
-            sostojki.add(sostojka);
-        }
-
-        result.close();
-        prepStm.close();
-        DB.closeConnection();
-
-        return sostojki;
-    }
+package com.example.cookbook.repository;public class SostojkiRespository {
 }
Index: src/main/java/com/example/cookbook/service/KomentariService.java
===================================================================
--- src/main/java/com/example/cookbook/service/KomentariService.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,13 +1,0 @@
-package com.example.cookbook.service;
-
-import com.example.cookbook.model.Komentar;
-
-import java.sql.SQLException;
-import java.util.List;
-
-public interface KomentariService {
-
-    List<Komentar> findAllById(Long recId) throws SQLException;
-
-    void add(String telefon, Long id, Integer ocena, String komentar) throws SQLException;
-}
Index: src/main/java/com/example/cookbook/service/KorisniciService.java
===================================================================
--- src/main/java/com/example/cookbook/service/KorisniciService.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,18 +1,0 @@
-package com.example.cookbook.service;
-
-import com.example.cookbook.model.Komentar;
-import com.example.cookbook.model.Korisnik;
-import com.example.cookbook.model.TipKorisnik;
-
-import java.sql.SQLException;
-import java.time.LocalDateTime;
-import java.util.List;
-
-public interface KorisniciService {
-
-
-    List<Korisnik> findAllByRole(TipKorisnik posetitel) throws SQLException;
-
-
-
-}
Index: src/main/java/com/example/cookbook/service/NarackiService.java
===================================================================
--- src/main/java/com/example/cookbook/service/NarackiService.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,19 +1,0 @@
-package com.example.cookbook.service;
-
-import com.example.cookbook.model.DostavaDTO;
-import com.example.cookbook.model.Naracka;
-import com.example.cookbook.model.Recept;
-import com.example.cookbook.model.Stavka;
-
-import java.sql.SQLException;
-import java.time.LocalDateTime;
-import java.util.List;
-
-public interface NarackiService {
-
-    List<Naracka> listAll() throws SQLException;
-
-    List<Stavka> findByTelAndVreme(String telefon, LocalDateTime vreme) throws SQLException;
-
-    List<DostavaDTO> findDataForDostava(String telefon, LocalDateTime vreme) throws SQLException;
-}
Index: src/main/java/com/example/cookbook/service/ReceptService.java
===================================================================
--- src/main/java/com/example/cookbook/service/ReceptService.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/service/ReceptService.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,13 +1,2 @@
-package com.example.cookbook.service;
-
-import com.example.cookbook.model.Recept;
-
-import java.sql.SQLException;
-import java.util.List;
-
-public interface ReceptService {
-
-    List<Recept> listAll() throws SQLException;
-
-    Recept findById(Long id) throws SQLException;
+package com.example.cookbook.service;public interface ReceptService {
 }
Index: src/main/java/com/example/cookbook/service/SlikiService.java
===================================================================
--- src/main/java/com/example/cookbook/service/SlikiService.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/service/SlikiService.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,13 +1,2 @@
-package com.example.cookbook.service;
-
-import com.example.cookbook.model.Slika;
-
-import java.sql.SQLException;
-import java.util.List;
-
-public interface SlikiService {
-
-    List<Slika> findAllPicById(Long recId) throws SQLException;
-
-
+package com.example.cookbook.service;public class SlikiService {
 }
Index: src/main/java/com/example/cookbook/service/SostojkiService.java
===================================================================
--- src/main/java/com/example/cookbook/service/SostojkiService.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/service/SostojkiService.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,11 +1,2 @@
-package com.example.cookbook.service;
-
-import com.example.cookbook.model.Sostojka;
-
-import java.sql.SQLException;
-import java.util.List;
-
-public interface SostojkiService {
-
-    List<Sostojka> findAllById(Long rId) throws SQLException;
+package com.example.cookbook.service;public interface SostojkiService {
 }
Index: src/main/java/com/example/cookbook/service/impl/KomentariServiceImpl.java
===================================================================
--- src/main/java/com/example/cookbook/service/impl/KomentariServiceImpl.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,34 +1,0 @@
-package com.example.cookbook.service.impl;
-
-
-import com.example.cookbook.model.Komentar;
-import com.example.cookbook.repository.KomentariRepository;
-import com.example.cookbook.service.KomentariService;
-import org.springframework.stereotype.Service;
-
-import java.sql.SQLException;
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Service
-public class KomentariServiceImpl implements KomentariService {
-
-    private final KomentariRepository komentariRepository;
-
-    public KomentariServiceImpl(KomentariRepository komentariRepository) {
-        this.komentariRepository = komentariRepository;
-    }
-
-    @Override
-    public List<Komentar> findAllById(Long recId) throws SQLException {
-        return komentariRepository.findAllByRecId(recId);
-    }
-
-    @Override
-    public void add(String telefon, Long id, Integer ocena, String komentar) throws SQLException {
-        if (telefon.isBlank() || ocena == null){
-            throw new IllegalArgumentException();
-        }
-        komentariRepository.save(new Komentar(LocalDateTime.now(), telefon, id, ocena, komentar));
-    }
-}
Index: src/main/java/com/example/cookbook/service/impl/KorisniciServiceImpl.java
===================================================================
--- src/main/java/com/example/cookbook/service/impl/KorisniciServiceImpl.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,32 +1,0 @@
-package com.example.cookbook.service.impl;
-
-
-import com.example.cookbook.model.Komentar;
-import com.example.cookbook.model.Korisnik;
-import com.example.cookbook.model.TipKorisnik;
-import com.example.cookbook.repository.KorisniciRepository;
-import com.example.cookbook.service.KorisniciService;
-import org.springframework.stereotype.Service;
-
-import java.sql.SQLException;
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Service
-public class KorisniciServiceImpl implements KorisniciService {
-
-
-    private final KorisniciRepository korisniciRepository;
-
-    public KorisniciServiceImpl(KorisniciRepository korisniciRepository) {
-        this.korisniciRepository = korisniciRepository;
-    }
-
-    @Override
-    public List<Korisnik> findAllByRole(TipKorisnik tipKorisnik) throws SQLException {
-        return korisniciRepository.findAllByRole(tipKorisnik);
-    }
-
-
-
-}
Index: src/main/java/com/example/cookbook/service/impl/NarackiServiceImpl.java
===================================================================
--- src/main/java/com/example/cookbook/service/impl/NarackiServiceImpl.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ 	(revision )
@@ -1,39 +1,0 @@
-package com.example.cookbook.service.impl;
-
-
-import com.example.cookbook.model.DostavaDTO;
-import com.example.cookbook.model.Naracka;
-import com.example.cookbook.model.Recept;
-import com.example.cookbook.model.Stavka;
-import com.example.cookbook.repository.NarackiRepository;
-import com.example.cookbook.service.NarackiService;
-import org.springframework.stereotype.Service;
-
-import java.sql.SQLException;
-import java.time.LocalDateTime;
-import java.util.List;
-
-@Service
-public class NarackiServiceImpl implements NarackiService {
-
-    private final NarackiRepository narackiRepository;
-
-    public NarackiServiceImpl(NarackiRepository narackiRepository) {
-        this.narackiRepository = narackiRepository;
-    }
-
-    @Override
-    public List<Naracka> listAll() throws SQLException {
-        return narackiRepository.findAll();
-    }
-
-    @Override
-    public List<Stavka> findByTelAndVreme(String telefon, LocalDateTime vreme) throws SQLException {
-        return narackiRepository.findByTelAndVreme(telefon, vreme);
-    }
-
-    @Override
-    public List<DostavaDTO> findDataForDostava(String telefon, LocalDateTime vreme) throws SQLException {
-        return narackiRepository.findDataForDostava(telefon, vreme);
-    }
-}
Index: src/main/java/com/example/cookbook/service/impl/ReceptServiceImpl.java
===================================================================
--- src/main/java/com/example/cookbook/service/impl/ReceptServiceImpl.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/service/impl/ReceptServiceImpl.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,35 +1,2 @@
-package com.example.cookbook.service.impl;
-
-import com.example.cookbook.model.Recept;
-import com.example.cookbook.model.exception.ReceptNeEPronajdenException;
-import com.example.cookbook.repository.ReceptRepository;
-import com.example.cookbook.service.ReceptService;
-import org.springframework.stereotype.Service;
-
-import java.sql.SQLException;
-import java.util.List;
-import java.util.Optional;
-
-@Service
-public class ReceptServiceImpl implements ReceptService {
-
-    private final ReceptRepository receptRepository;
-
-    public ReceptServiceImpl(ReceptRepository receptRepository) {
-        this.receptRepository = receptRepository;
-    }
-
-    @Override
-    public List<Recept> listAll() throws SQLException {
-        return receptRepository.findAll();
-    }
-
-    @Override
-    public Recept findById(Long id) throws SQLException {
-        Recept recept;
-
-        recept = receptRepository.findById(id).orElseThrow(ReceptNeEPronajdenException::new);
-
-        return recept;
-    }
+package com.example.cookbook.service.impl;public class ReceptServiceImpl {
 }
Index: src/main/java/com/example/cookbook/service/impl/SlikiServiceImpl.java
===================================================================
--- src/main/java/com/example/cookbook/service/impl/SlikiServiceImpl.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/service/impl/SlikiServiceImpl.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,25 +1,2 @@
-package com.example.cookbook.service.impl;
-
-
-import com.example.cookbook.model.Slika;
-import com.example.cookbook.repository.SlikiZaReceptRepository;
-import com.example.cookbook.service.SlikiService;
-import org.springframework.stereotype.Service;
-
-import java.sql.SQLException;
-import java.util.List;
-
-@Service
-public class SlikiServiceImpl implements SlikiService {
-
-    private final SlikiZaReceptRepository slikiZaReceptRepository;
-
-    public SlikiServiceImpl(SlikiZaReceptRepository slikiZaReceptRepository) {
-        this.slikiZaReceptRepository = slikiZaReceptRepository;
-    }
-
-    @Override
-    public List<Slika> findAllPicById(Long recId) throws SQLException {
-        return slikiZaReceptRepository.findAllForRecipe(recId);
-    }
+package com.example.cookbook.service.impl;public class SlikiService {
 }
Index: src/main/java/com/example/cookbook/service/impl/SostojkiServiceImpl.java
===================================================================
--- src/main/java/com/example/cookbook/service/impl/SostojkiServiceImpl.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
+++ src/main/java/com/example/cookbook/service/impl/SostojkiServiceImpl.java	(revision 3e572eb5078b74bc9c8fc83edc749c611308dd26)
@@ -1,25 +1,2 @@
-package com.example.cookbook.service.impl;
-
-
-import com.example.cookbook.model.Sostojka;
-import com.example.cookbook.repository.SostojkiRespository;
-import com.example.cookbook.service.SostojkiService;
-import org.springframework.stereotype.Service;
-
-import java.sql.SQLException;
-import java.util.List;
-
-@Service
-public class SostojkiServiceImpl implements SostojkiService {
-
-    private final SostojkiRespository sostojkiRepository;
-
-    public SostojkiServiceImpl(SostojkiRespository sostojkiRepository) {
-        this.sostojkiRepository = sostojkiRepository;
-    }
-
-    @Override
-    public List<Sostojka> findAllById(Long rId) throws SQLException {
-        return sostojkiRepository.findAllByRId(rId);
-    }
+package com.example.cookbook.service.impl;public class SostojkiServiceImpl {
 }
