import { Article, axios, Page, PageResult } from "timi-web";
import { ArticleRanking } from "@/types/Article.ts";

async function page(page: Page<Article<any>>): Promise<PageResult<Article<any>>> {
	return axios.post("/article/list", page);
}

async function listRanking(): Promise<ArticleRanking[]> {
	return axios.get("/article/list/ranking");
}

export default {
	page,
	listRanking
};
