package kr.lunaticbum.back.lun.controllers.api

import kr.lunaticbum.back.lun.model.VisitorLogService
import kr.lunaticbum.back.lun.model.VisitorStatsDto
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import reactor.core.publisher.Mono

@RestController
@RequestMapping("/api/stats")
class VisitorStatsController(private val visitorLogService: VisitorLogService) {

    @GetMapping("/visitors")
    fun getVisitorStatistics(): Mono<VisitorStatsDto> {
        return visitorLogService.getVisitorStats()
    }
}