worldIndices.ts 574 B

12345678910111213141516
  1. 'use server';
  2. import { ResultDto } from '@/types/response/common';
  3. import { WorldIndicesResponse } from '@/types/worldIndex';
  4. import { fetchJson } from '@/lib/utils/server';
  5. const JSON_HEADERS = { 'Accept': 'application/json' } as const;
  6. // 세계 주요국 증시지수 — 국내(코스피) + 해외 스냅샷 병합. 메인 세계지도 핀 (익명 열람)
  7. export async function fetchWorldIndices(): Promise<ResultDto<WorldIndicesResponse>>
  8. {
  9. return await fetchJson<WorldIndicesResponse>('/api/market/world-indices', {
  10. method: 'GET',
  11. headers: JSON_HEADERS
  12. });
  13. }