source: trip-planner/src/main/java/finki/diplomska/tripplanner/web/rest/ImagesRestController.java@ 84d0fbb

Last change on this file since 84d0fbb was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 718 bytes
Line 
1package finki.diplomska.tripplanner.web.rest;
2
3import finki.diplomska.tripplanner.models.Images;
4import finki.diplomska.tripplanner.service.ImagesService;
5import org.springframework.web.bind.annotation.*;
6
7import java.util.List;
8
9@RestController
10@CrossOrigin(origins = "http://localhost:4200")
11@RequestMapping(value = "/api")
12public class ImagesRestController {
13 private final ImagesService imagesService;
14
15 public ImagesRestController(ImagesService imagesService) {
16 this.imagesService = imagesService;
17 }
18
19 @GetMapping(value = "/images")
20 public List<Images> getAllImagesForLocation(@RequestParam Long locationId){
21 return this.imagesService.getAllImagesForLocation(locationId);
22 }
23}
Note: See TracBrowser for help on using the repository browser.