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.ImportRoleApi;
import com.ikon.projectmanagement.dto.response.RoleResponseDto;
import com.ikon.projectmanagement.service.ImportRoleService;

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

@RestController
@RequiredArgsConstructor
@Slf4j
public class ImportRoleController implements ImportRoleApi {

    private final ImportRoleService importRoleService;

    @Override
    public ResponseEntity<List<RoleResponseDto>> fetchAllRoles(String accessToken) {
        return ResponseEntity.ok(importRoleService.importRoles(accessToken));
    }
}
