Changeset 448bd84 for src/main/java


Ignore:
Timestamp:
02/04/23 21:37:57 (23 months ago)
Author:
milamihajlovska <mila.mihajlovska01@…>
Branches:
master
Children:
533c366, eb5426c
Parents:
a073dad
Message:

added listing workers

Location:
src/main/java/com/example/moviezone
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/moviezone/service/FilmService.java

    ra073dad r448bd84  
    99    List<Film> findAllFilms();
    1010    Film save(String name, Integer duration, String actors, String genre,
    11               String age_category, String url, String director, LocalDate start_date,LocalDate end_date );
     11              String age_category, String url, String director, LocalDate start_date,LocalDate end_date);
    1212}
  • src/main/java/com/example/moviezone/web/HomeController.java

    ra073dad r448bd84  
    33
    44import com.example.moviezone.model.Customer;
    5 import com.example.moviezone.model.Film;
    65import com.example.moviezone.model.User;
    76import com.example.moviezone.model.exceptions.UserNotFoundException;
     
    2726private final EventService eventService;
    2827private final TicketService ticketService;
     28private final WorkerService workerService;
    2929
    30     public HomeController(FilmService filmService, UserService userService, ProjectionService projectionService, EventService eventService, TicketService ticketService) {
     30    public HomeController(FilmService filmService, UserService userService, ProjectionService projectionService, EventService eventService, TicketService ticketService, WorkerService workerService) {
    3131        this.filmService = filmService;
    3232        this.userService = userService;
     
    3434        this.eventService = eventService;
    3535        this.ticketService = ticketService;
     36        this.workerService = workerService;
    3637    }
    3738
     
    169170    }
    170171
     172    @GetMapping("/workers")
     173    public String getWorkersPage(Model model)
     174    {
     175        model.addAttribute("workers",workerService.findAllWorkers());
     176        model.addAttribute("bodyContent", "workers");
     177        return "master-template";
     178    }
    171179}
Note: See TracChangeset for help on using the changeset viewer.