use of com.zavada.domain.CreateAdvRequest in project Logos_Materials_October_2017 by VolodymyrZavada.
the class UserController method createAdvertisement.
// --- Advertisement
@GetMapping("/{userId}/create")
public String createAdvertisement(@PathVariable("userId") int userId, Model model, Principal principal) {
UserEntity entity = userService.findUserByEmail(principal.getName());
CreateAdvRequest advRequest = new CreateAdvRequest();
advRequest.setEntity(entity);
model.addAttribute("title", "Create Advertisement");
// model.addAttribute("userId", userId);
model.addAttribute("advModel", advRequest);
model.addAttribute("colors", Color.values());
model.addAttribute("fuelTypes", FuelType.values());
model.addAttribute("bodyTypes", BodyType.values());
return "user/create-adv";
}
Aggregations