package com.hertz.modules.monitor.controller;

import com.hertz.common.api.ApiResponse;
import com.hertz.modules.monitor.dto.MonitorDto;
import com.hertz.modules.monitor.service.MonitorService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/monitor")
@RequiredArgsConstructor
public class MonitorController {

    private final MonitorService monitorService;

    @GetMapping("/server")
    public ApiResponse<MonitorDto> getServerInfo() {
        return ApiResponse.ok(monitorService.getServerInfo());
    }
}
