package com.spring.domain.endpoint.api;

import java.util.List;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.spring.domain.endpoint.dto.EndpointInfo;
import com.spring.domain.endpoint.service.EndpointCollectorService;

import lombok.RequiredArgsConstructor;

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/endpoint")
public class EndpointApi {
    
    private final EndpointCollectorService endpointCollectorService;

    @GetMapping
    public List<EndpointInfo> getEndpoints() {
        return endpointCollectorService.collectApiEndpoints();
    }

}
