package com.ikon.projectmanagement.controller;

import java.util.List;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RestController;

import com.ikon.projectmanagement.api.ImportEmployeeApi;
import com.ikon.projectmanagement.dto.response.EmployeeResponseDto;
import com.ikon.projectmanagement.service.ImportEmployeeService;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@RestController
@RequiredArgsConstructor
@Slf4j
public class ImportEmployeeController implements ImportEmployeeApi {

    private final ImportEmployeeService importEmployeeService;

    @Override
    public ResponseEntity<List<EmployeeResponseDto>> fetchAllEmployees(String accessToken) {
        return ResponseEntity.ok(importEmployeeService.importEmployees(accessToken));
    }
}
