import { cache } from 'react';
import { publicServerRequest } from '@/lib/server/request';

export const fetchCharacterDetail = cache(async (id: string) => {
  const res = await publicServerRequest(`/character/detail`, {
    method: 'post',
    params: {
      roleId: id,
    },
  });
  return res.data ?? {};
});
