|
Last change
on this file was 09e02d7, checked in by Nikola Sarafimov <sarafimov.nikola12345@…>, 4 days ago |
|
Final room reservation system implementation
|
-
Property mode
set to
100644
|
|
File size:
813 bytes
|
| Line | |
|---|
| 1 | package mk.finki.roomreservation.controller;
|
|---|
| 2 |
|
|---|
| 3 | import mk.finki.roomreservation.model.DashboardStats;
|
|---|
| 4 | import mk.finki.roomreservation.model.HealthStatus;
|
|---|
| 5 | import mk.finki.roomreservation.service.DashboardService;
|
|---|
| 6 | import org.springframework.web.bind.annotation.GetMapping;
|
|---|
| 7 | import org.springframework.web.bind.annotation.RestController;
|
|---|
| 8 |
|
|---|
| 9 | @RestController
|
|---|
| 10 | public class DashboardController {
|
|---|
| 11 |
|
|---|
| 12 | private final DashboardService dashboardService;
|
|---|
| 13 |
|
|---|
| 14 | public DashboardController(DashboardService dashboardService) {
|
|---|
| 15 | this.dashboardService = dashboardService;
|
|---|
| 16 | }
|
|---|
| 17 |
|
|---|
| 18 | @GetMapping("/api/health")
|
|---|
| 19 | public HealthStatus health() {
|
|---|
| 20 | return dashboardService.health();
|
|---|
| 21 | }
|
|---|
| 22 |
|
|---|
| 23 | @GetMapping("/api/dashboard")
|
|---|
| 24 | public DashboardStats dashboard() {
|
|---|
| 25 | return dashboardService.getDashboardStats();
|
|---|
| 26 | }
|
|---|
| 27 | } |
|---|
Note:
See
TracBrowser
for help on using the repository browser.