import { request } from '@umijs/max';
import type { RankingItem, RankingParams } from '@/pages/Ranking/data';

/** 获取排名列表 GET /api/ranking/list */
export async function queryRankingList(params: RankingParams) {
    return request<{
        data: RankingItem[];
        total?: number;
        success?: boolean;
    }>('/api/ranking/list', {
        method: 'GET',
        params: {
            ...params,
        },
    });
}
