Last change
on this file since 76712b2 was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago |
adding photos
|
-
Property mode
set to
100644
|
File size:
718 bytes
|
Rev | Line | |
---|
[59329aa] | 1 | package finki.diplomska.tripplanner.web.rest;
|
---|
| 2 |
|
---|
| 3 | import finki.diplomska.tripplanner.models.Images;
|
---|
| 4 | import finki.diplomska.tripplanner.service.ImagesService;
|
---|
| 5 | import org.springframework.web.bind.annotation.*;
|
---|
| 6 |
|
---|
| 7 | import java.util.List;
|
---|
| 8 |
|
---|
| 9 | @RestController
|
---|
| 10 | @CrossOrigin(origins = "http://localhost:4200")
|
---|
| 11 | @RequestMapping(value = "/api")
|
---|
| 12 | public 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.