source: bus-n-go-pavel-216049/bus-n-go-backend/src/main/kotlin/mk/ukim/finki/busngobackend/api/UserController.kt

Last change on this file was baf4cc4, checked in by ppaunovski <paunovskipavel@…>, 4 weeks ago

split group project and individual project into two separate folders

  • Property mode set to 100644
File size: 669 bytes
Line 
1package mk.ukim.finki.busngobackend.api
2
3import mk.ukim.finki.busngobackend.api.responses.UserResponse
4import mk.ukim.finki.busngobackend.service.KorisnikService
5import org.springframework.web.bind.annotation.GetMapping
6import org.springframework.web.bind.annotation.RequestMapping
7import org.springframework.web.bind.annotation.RestController
8
9@RestController
10@RequestMapping("/api/users")
11class 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.