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:
812 bytes
|
Line | |
---|
1 | package mk.ukim.finki.busngobackend.api
|
---|
2 |
|
---|
3 | import mk.ukim.finki.busngobackend.api.requests.StartCommuteRequest
|
---|
4 | import mk.ukim.finki.busngobackend.service.CommuteService
|
---|
5 | import org.springframework.web.bind.annotation.PutMapping
|
---|
6 | import org.springframework.web.bind.annotation.RequestBody
|
---|
7 | import org.springframework.web.bind.annotation.RequestMapping
|
---|
8 | import org.springframework.web.bind.annotation.RestController
|
---|
9 |
|
---|
10 | @RestController
|
---|
11 | @RequestMapping("/api/commutes")
|
---|
12 | class CommuteController(
|
---|
13 | private val commuteService: CommuteService,
|
---|
14 | ) {
|
---|
15 | @PutMapping("/start")
|
---|
16 | fun startCommute(
|
---|
17 | @RequestBody request: StartCommuteRequest,
|
---|
18 | ) = commuteService.start(request)
|
---|
19 |
|
---|
20 | // subscribe to the topic for that station
|
---|
21 | // receive the incoming route instances
|
---|
22 | // choose one as target and start commute
|
---|
23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.