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.ImportGradeApi;
import com.ikon.projectmanagement.dto.response.GradeResponseDto;
import com.ikon.projectmanagement.service.ImportGradeService;

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

@RestController
@RequiredArgsConstructor
@Slf4j
public class ImportGradeController implements ImportGradeApi {

    private final ImportGradeService importGradeService;

    @Override
    public ResponseEntity<List<GradeResponseDto>> fetchAllGrades(String accessToken) {
        return ResponseEntity.ok(importGradeService.importGrades(accessToken));
    }
}
