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.ImportWorkingDayApi;
import com.ikon.projectmanagement.dto.response.WorkingDayDto;
import com.ikon.projectmanagement.service.ImportWorkingDayService;

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

@RestController
@RequiredArgsConstructor
@Slf4j
public class ImportWorkingDayController implements ImportWorkingDayApi {

    private final ImportWorkingDayService importWorkingDayService;

    @Override
    public ResponseEntity<List<WorkingDayDto>> fetchAllWorkingDays(String accessToken) {
        return ResponseEntity.ok(importWorkingDayService.importWorkingDays(accessToken));
    }
}
