import { cache } from 'react';
import { ResultDto } from '@/types/response/common';
import { fetchJson } from '@/lib/utils/server';
import Config from '@/types/config';

// Config 값 조회
export const fetchConfig = cache(async (): Promise<ResultDto<Config|null>> => {
    return await fetchJson<Config>('/api/config', {
        method: 'GET',
        headers: {'Content-Type': 'application/json'},
    });
});