system.ts 366 B

12345678910111213
  1. 'use server';
  2. import { ResultDto } from '@/dtos/response/common';
  3. import { fetchJson } from '@/lib/utils/server';
  4. import Config from '@/types/config';
  5. // Config 값 조회
  6. export async function fetchConfig(): Promise<ResultDto<Config|null>> {
  7. return await fetchJson<Config>('/api/config', {
  8. method: 'GET',
  9. headers: {'Content-Type': 'application/json'},
  10. });
  11. }