package org.codiki.metrics;

import org.codiki.core.entities.dto.Metrics;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/metrics")
public class MetricsController {

    private MetricsService metricsService;

    /**
     * Constructor.
     * @param metricsService Metrics service.
     */
    public MetricsController(MetricsService metricsService) {
        this.metricsService = metricsService;
    }

    @GetMapping("/healthCheck")
    public Metrics healthCheck() {
        return metricsService.getMetrics();
    }
}
