Skip to content

Commit cee88cb

Browse files
committed
fix: reply
1 parent e816017 commit cee88cb

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/api/comments.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ export const commentsApi = {
2525

2626
// 回复评论(普通)
2727
reply: (id: string, data: ReplyCommentData) =>
28-
request.post<CommentModel>(`/comments/owner/reply/${id}`, { data }),
28+
request.post<CommentModel>(`/comments/reader/reply/${id}`, { data }),
2929

30-
// 主人回复评论(只需 text)
31-
ownerReply: (id: string, text: string) =>
32-
request.post<CommentModel>(`/comments/owner/reply/${id}`, {
30+
// 登录态回复评论(只需 text)
31+
readerReply: (id: string, text: string) =>
32+
request.post<CommentModel>(`/comments/reader/reply/${id}`, {
3333
data: { text },
3434
}),
3535

src/views/comments/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ const ManageComment = defineComponent(() => {
8989

9090
const replyMutation = useMutation({
9191
mutationFn: ({ id, text }: { id: string; text: string }) =>
92-
commentsApi.ownerReply(id, text),
92+
commentsApi.readerReply(id, text),
9393
onSuccess: () => {
9494
toast.success('回复成功')
9595
queryClient.invalidateQueries({ queryKey: queryKeys.comments.all })

0 commit comments

Comments
 (0)