Ignore:
Timestamp:
02/06/23 20:10:28 (22 months ago)
Author:
DenicaKj <dkorvezir@…>
Branches:
master
Children:
d09caa7
Parents:
b5ce654
Message:

Adding Events To Home Page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/moviezone/web/HomeController.java

    rb5ce654 r0fb69cc  
    22
    33
    4 import com.example.moviezone.model.Customer;
    5 import com.example.moviezone.model.Film;
    6 import com.example.moviezone.model.Role;
    7 import com.example.moviezone.model.User;
     4import com.example.moviezone.model.*;
    85import com.example.moviezone.model.exceptions.PasswordsDoNotMatchException;
    96import com.example.moviezone.model.exceptions.UserNotFoundException;
     
    4542        List<Film> films=filmService.findAllFilms();
    4643        films=films.stream().limit(5).collect(Collectors.toList());
     44        List <Event> events=eventService.findAllEvents().stream().limit(5).collect(Collectors.toList());
    4745        model.addAttribute("films", films);
     46        model.addAttribute("events",events);
    4847        model.addAttribute("bodyContent", "home");
    4948
     
    177176                                 @RequestParam String theme,
    178177                                 @RequestParam String duration,
     178                                @RequestParam String img_url,
    179179                            @RequestParam String repeating)
    180180    {
    181         eventService.save(start_date,theme,duration,repeating);
     181        eventService.save(start_date,theme,duration,repeating,img_url);
    182182        return "redirect:/home";
    183183    }
Note: See TracChangeset for help on using the changeset viewer.