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:
669 bytes
|
Line | |
---|
1 | package mk.ukim.finki.busngobackend.api
|
---|
2 |
|
---|
3 | import mk.ukim.finki.busngobackend.api.responses.UserResponse
|
---|
4 | import mk.ukim.finki.busngobackend.service.KorisnikService
|
---|
5 | import org.springframework.web.bind.annotation.GetMapping
|
---|
6 | import org.springframework.web.bind.annotation.RequestMapping
|
---|
7 | import org.springframework.web.bind.annotation.RestController
|
---|
8 |
|
---|
9 | @RestController
|
---|
10 | @RequestMapping("/api/users")
|
---|
11 | class UserController(
|
---|
12 | private val korisnikService: KorisnikService,
|
---|
13 | ) {
|
---|
14 | @GetMapping()
|
---|
15 | fun getAuthenticatedUser(): UserResponse = korisnikService.getAuthenticatedUser()
|
---|
16 |
|
---|
17 | @GetMapping("/passengers")
|
---|
18 | fun getAllPassengers() = korisnikService.getAllPassengers()
|
---|
19 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.