fix Comment Page

This commit is contained in:
Timi
2026-01-15 15:22:07 +08:00
parent 5feb987af6
commit 8e9ba23f72
2 changed files with 17 additions and 42 deletions

View File

@@ -1,27 +1,17 @@
import {
axios,
CaptchaData,
Comment,
CommentPage,
CommentReply,
CommentReplyPage,
CommentReplyView,
CommentView,
PageResult
} from "~/index";
import { axios, CaptchaData, Comment, CommentReply, Page, PageResult } from "~/index";
const BASE_URI = "/comment";
async function page(commentPage: CommentPage): Promise<PageResult<CommentView>> {
return axios.post(`${BASE_URI}/list`, commentPage);
async function page(page: Page<Comment>): Promise<PageResult<Comment>> {
return axios.post(`${BASE_URI}/list`, page);
}
async function create(captchaData: CaptchaData<Comment>): Promise<void> {
return axios.post(`${BASE_URI}/create`, captchaData);
}
async function pageReply(commentReplyPage: CommentReplyPage): Promise<PageResult<CommentReplyView>> {
return axios.post(`${BASE_URI}/reply/list`, commentReplyPage);
async function pageReply(page: Page<CommentReply>): Promise<PageResult<CommentReply>> {
return axios.post(`${BASE_URI}/reply/list`, page);
}
async function createReply(captchaData: CaptchaData<CommentReply>): Promise<void> {