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:
626 bytes
|
Line | |
---|
1 | package mk.ukim.finki.busngobackend.api
|
---|
2 |
|
---|
3 | import mk.ukim.finki.busngobackend.service.ControlService
|
---|
4 | import org.springframework.web.bind.annotation.*
|
---|
5 |
|
---|
6 | @RestController
|
---|
7 | @RequestMapping("/api/controls")
|
---|
8 | class ControlsController(
|
---|
9 | private val controlService: ControlService,
|
---|
10 | ) {
|
---|
11 | @GetMapping()
|
---|
12 | fun getControls() = controlService.getAllByConductor()
|
---|
13 |
|
---|
14 | @PutMapping("/start")
|
---|
15 | fun start(
|
---|
16 | @RequestBody routeInstanceId: Long,
|
---|
17 | ) = controlService.start(routeInstanceId)
|
---|
18 |
|
---|
19 | @GetMapping("/{controlId}/fines")
|
---|
20 | fun getFines(
|
---|
21 | @PathVariable controlId: Long,
|
---|
22 | ) = controlService.getFines(controlId)
|
---|
23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.