Last change
on this file was baf4cc4, checked in by ppaunovski <paunovskipavel@…>, 3 months ago |
split group project and individual project into two separate folders
|
-
Property mode
set to
100644
|
File size:
531 bytes
|
Line | |
---|
1 | package mk.ukim.finki.busngobackend.api
|
---|
2 |
|
---|
3 | import mk.ukim.finki.busngobackend.service.BusService
|
---|
4 | import org.springframework.web.bind.annotation.GetMapping
|
---|
5 | import org.springframework.web.bind.annotation.RequestMapping
|
---|
6 | import org.springframework.web.bind.annotation.RestController
|
---|
7 |
|
---|
8 | @RestController
|
---|
9 | @RequestMapping("/api/buses")
|
---|
10 | class BusController(
|
---|
11 | private val busService: BusService,
|
---|
12 | ) {
|
---|
13 | @GetMapping("")
|
---|
14 | fun getAllBuses() = busService.findAll()
|
---|
15 |
|
---|
16 | @GetMapping("/free")
|
---|
17 | fun getAllFrees() = busService.findAllFree()
|
---|
18 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.