import request from '@/utils/request';
import type { ApiResult } from '@/api';
import type { Composer, ComposerParam } from './model';

/**
 * 查询composer信息
 */
export async function composerInfo(params?: ComposerParam) {
  const res = await request.get<ApiResult<Composer>>('/system/composer', {
    params
  });
  if (res.data.code === 0 && res.data.data) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
