import { editorRequest } from '@/lib/client';

export async function fetchCharacters({ index, limit, query }: any) {
  const { data } = await editorRequest('/api/character/list', {
    method: 'POST',
    data: { index, limit, ...query },
  });
  return data;
}

export async function fetchCharacter(params: any) {
  const { data } = await editorRequest('/api/character/detail', { method: 'POST', data: params });
  return data;
}

export async function fetchCharacterTags(params: any = {}) {
  return editorRequest('/api/tag/list', { method: 'POST', data: params });
}
